diff --git a/docs/row-selection.md b/docs/row-selection.md index ac7eba7..d7f2e57 100644 --- a/docs/row-selection.md +++ b/docs/row-selection.md @@ -16,6 +16,8 @@ * [onSelect](#onSelect) * [onSelectAll](#onSelectAll) * [hideSelectColumn](#hideSelectColumn) +* [selectionRenderer](#selectionRenderer) +* [selectionHeaderRenderer](#selectionHeaderRenderer) ### selectRow.mode - [String] @@ -156,6 +158,34 @@ const selectRow = { }; ``` +### selectRow.selectionRenderer - [Bool] +Provide a callback function which allow you to custom the checkbox/radio box. This callback only have one argument which is an object and contain following properties: + +```js +const selectRow = { + mode: 'checkbox', + selectionRenderer: ({ mode, checked, disabled }) => ( + // .... + ) +}; +``` + +> By default, `react-bootstrap-table2` will help you to handle the click event, it's not necessary to handle again by developer. + +### selectRow.selectionHeaderRenderer - [Bool] +Provide a callback function which allow you to custom the checkbox/radio box in the selection header column. This callback only have one argument which is an object and contain following properties: + +```js +const selectRow = { + mode: 'checkbox', + selectionHeaderRenderer: ({ mode, checked, indeterminate }) => ( + // .... + ) +}; +``` + +> By default, `react-bootstrap-table2` will help you to handle the click event, it's not necessary to handle again by developer. + ### selectRow.onSelect - [Function] This callback function will be called when a row is select/unselect and pass following three arguments: `row`, `isSelect`, `rowIndex` and `e`.