diff --git a/docs/row-selection.md b/docs/row-selection.md index 9ed4e9f..9a09361 100644 --- a/docs/row-selection.md +++ b/docs/row-selection.md @@ -12,6 +12,7 @@ * [bgColor](#bgColor) * [nonSelectable)](#nonSelectable) * [clickToSelect)](#clickToSelect) +* [clickToExpand)](#clickToExpand) * [clickToEdit](#clickToEdit) * [onSelect](#onSelect) * [onSelectAll](#onSelectAll) @@ -148,6 +149,16 @@ const selectRow = { > Note: When 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) +### selectRow.clickToExpand - [Bool] +Default is false, enable it will let user able to expand and select row when user clicking on the row. + +```js +const selectRow = { + mode: 'checkbox', + clickToExpand: true +}; +``` + ### selectRow.clickToEdit - [Bool] Able to click to edit cell and select row diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 053cac1..2bf37a3 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -139,6 +139,7 @@ BootstrapTable.propTypes = { Const.ROW_SELECT_DISABLED ]).isRequired, clickToSelect: PropTypes.bool, + clickToExpand: PropTypes.bool, clickToEdit: PropTypes.bool, hideSelectAll: PropTypes.bool, onSelect: PropTypes.func,