This commit is contained in:
AllenFang
2019-02-17 15:25:32 +08:00
parent cd27ff98ff
commit a7c2a49182
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ Provide a callback function which allow you to custom the checkbox/radio box. Th
```js
const selectRow = {
mode: 'checkbox',
selectionRenderer: ({ mode, checked, disabled }) => (
selectionRenderer: ({ mode, checked, disabled, rowIndex }) => (
// ....
)
};
@@ -63,6 +63,7 @@ export default class SelectionCell extends Component {
selected,
disabled,
tabIndex,
rowIndex,
selectionRenderer
} = this.props;
@@ -78,7 +79,8 @@ export default class SelectionCell extends Component {
selectionRenderer ? selectionRenderer({
mode: inputType,
checked: selected,
disabled
disabled,
rowIndex
}) : (
<input
type={ inputType }
@@ -295,7 +295,8 @@ describe('<SelectionCell />', () => {
expect(selectionRenderer).toHaveBeenCalledWith({
mode,
checked: selected,
disabled: wrapper.prop('disabled')
disabled: wrapper.prop('disabled'),
rowIndex
});
});
});