mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2026-06-28 21:20:04 +00:00
fix #111
* 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:
@@ -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
|
||||
};
|
||||
```
|
||||
Reference in New Issue
Block a user