diff --git a/docs/row-expand.md b/docs/row-expand.md index 5de4f7b..ce710de 100644 --- a/docs/row-expand.md +++ b/docs/row-expand.md @@ -92,15 +92,16 @@ const expandRow = { ``` ### expandRow.expandColumnRenderer - [Function] -Provide a callback function which allow you to custom the expand indicator. This callback only have one argument which is an object and contain two properties: -* `expanded`: Indicate if current row is expanded or not +Provide a callback function which allow you to custom the expand indicator. This callback only have one argument which is an object and contain these properties: +* `expanded`: If current row is expanded or not * `rowKey`: Current row key +* `expandable`: If currnet row is expandable or not ```js const expandRow = { renderer: (row) => ... - expandColumnRenderer: ({ expanded, rowKey }) => ( + expandColumnRenderer: ({ expanded, rowKey, expandable }) => ( // .... ) }; diff --git a/packages/react-bootstrap-table2-example/examples/row-expand/custom-expand-column.js b/packages/react-bootstrap-table2-example/examples/row-expand/custom-expand-column.js index b1ed8c1..507bcf2 100644 --- a/packages/react-bootstrap-table2-example/examples/row-expand/custom-expand-column.js +++ b/packages/react-bootstrap-table2-example/examples/row-expand/custom-expand-column.js @@ -34,7 +34,7 @@ const expandRow = { } return +; }, - expandColumnRenderer: ({ expanded, rowKey }) => { + expandColumnRenderer: ({ expanded, rowKey, expandable }) => { if (expanded) { return ( - diff --git a/packages/react-bootstrap-table2/src/row-expand/expand-cell.js b/packages/react-bootstrap-table2/src/row-expand/expand-cell.js index dc7bf24..4b5903d 100644 --- a/packages/react-bootstrap-table2/src/row-expand/expand-cell.js +++ b/packages/react-bootstrap-table2/src/row-expand/expand-cell.js @@ -47,6 +47,7 @@ export default class ExpandCell extends Component {