mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
fix #546
This commit is contained in:
parent
dd54294382
commit
15731932cf
@ -156,6 +156,7 @@ BootstrapTable.propTypes = {
|
||||
nonExpandable: PropTypes.array,
|
||||
showExpandColumn: PropTypes.bool,
|
||||
onlyOneExpanding: PropTypes.bool,
|
||||
expandByColumnOnly: PropTypes.bool,
|
||||
expandColumnRenderer: PropTypes.func,
|
||||
expandHeaderColumnRenderer: PropTypes.func
|
||||
}),
|
||||
|
||||
@ -23,7 +23,7 @@ export default class ExpandCell extends Component {
|
||||
handleClick(e) {
|
||||
const { rowKey, expanded, onRowExpand, rowIndex } = this.props;
|
||||
|
||||
onRowExpand(rowKey, expanded, rowIndex, e);
|
||||
onRowExpand(rowKey, !expanded, rowIndex, e);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@ -32,13 +32,12 @@ export default ExtendBase =>
|
||||
selectRow,
|
||||
DELAY_FOR_DBCLICK
|
||||
} = this.props;
|
||||
|
||||
const clickFn = () => {
|
||||
if (cb) {
|
||||
cb(e, row, rowIndex);
|
||||
}
|
||||
const key = _.get(row, keyField);
|
||||
if (expandRow && expandable) {
|
||||
if (expandRow && expandable && !expandRow.expandByColumnOnly) {
|
||||
if (
|
||||
(selectRow.mode !== Const.ROW_SELECT_DISABLED && selectRow.clickToExpand) ||
|
||||
selectRow.mode === Const.ROW_SELECT_DISABLED
|
||||
|
||||
Loading…
Reference in New Issue
Block a user