* implement selectRow.bgColor

* add story for selectRow.bgColor

* add testing for selectRow.bgColor

* patch docs for selectRow.bgColor
This commit is contained in:
Allen
2017-10-23 03:08:30 -05:00
committed by GitHub
parent afc41879ee
commit b16da90ae9
6 changed files with 197 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ The following are available properties in `selectRow`:
* [mode (**required**)](#mode)
* [style](#style)
* [classes)](#classes)
* [bgColor](#bgColor)
* [nonSelectable)](#nonSelectable)
#### Optional
@@ -88,6 +89,27 @@ const selectRow = {
};
```
## <a name='bgColor'>selectRow.bgColor - [String | Function]</a>
The backgroud color when row is selected
```js
const selectRow = {
mode: 'checkbox',
bgColor: 'red'
};
```
There's also a more good way to custom it:
```js
const selectRow = {
mode: 'checkbox',
bgColor: (row, rowIndex) => {
return ....; // return a color code
}
};
```
## <a name='nonSelectable'>selectRow.nonSelectable - [Array]</a>
This prop allow you to restrict some rows which can not be selected by user. `selectRow.nonSelectable` accept an rowkeys array.