* implement selectRow.clickToSelect and selectRow.clickToEdit

* add selectRow.clickToSelect and selectRow.clickToEdit stories

* add clickToSelect to row selection examples for easier to select row

* refine selectRow.nonSelectable

* patch tests for selectRow.clickToSelect and selectRow.clickToEdit

* patch docs for selectRow.clickToSelect and selectRow.clickToEdit
This commit is contained in:
Allen
2017-10-26 01:35:09 -05:00
committed by GitHub
parent bbeb122af1
commit 985a1713ae
20 changed files with 588 additions and 103 deletions

View File

@@ -13,6 +13,8 @@ The following are available properties in `selectRow`:
* [classes)](#classes)
* [bgColor](#bgColor)
* [nonSelectable)](#nonSelectable)
* [clickToSelect)](#clickToSelect)
* [clickToEdit](#clickToEdit)
#### Optional
@@ -118,4 +120,28 @@ const selectRow = {
mode: 'checkbox',
nonSelectable: [1, 3 ,5]
};
```
## <a name='clickToSelect'>selectRow.clickToSelect - [Bool]</a>
Able to select row when clicking on row.
```js
const selectRow = {
mode: 'checkbox',
clickToSelect: true
};
```
> Note: if you also enable [cellEdit](./cell-edit.md), the `selectRow.clickToSelect` will deactivate the functionality of cell editing
> If you want to click on row to select row and edit cell simultaneously, you are suppose to enable [`selectRow.clickToEdit`](#clickToEdit)
## <a name='clickToEdit'>selectRow.clickToEdit - [Bool]</a>
Able to click to edit cell and select row
```js
const selectRow = {
mode: 'checkbox',
clickToSelect: true
clickToEdit: true
};
```