Support making expansion depend on which column of a row was clicked
See original GitHub issueQuestion Is it possible to make expandRow include the column that was selected?
I have a BootstrapTable where I want to be able to show a different expansion, depending on which column thew user clicked. I can see which column was clicked by looking at the event in the expandRow.onExpand handler, but I haven’t found a good way make the result of the subsequent expandRow.render call depend on it.
I would like a column index as a parameter to the render method, and I would like a way to prevent expansion be returning false from the render method, e.g. not all columns need to cause an expansion of the row.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Expand, collapse, or show details in a PivotTable ...
In a PivotTable or PivotChart, you can expand or collapse to any level of data detail, and even for all levels of detail...
Read more >How to prevent row from expanding when a column has ...
In your template, pass the $event to your openAlert() method. (click)="openAlert($event)". Then, in your typescript file update the ...
Read more >How to group rows in Excel to collapse and expand them
On the Data tab, in the Outline group, click the Group button, select Rows, and click OK. This will add a bar on...
Read more >ARIA: row role - Accessibility - MDN Web Docs - Mozilla
An element with role="row" is a row of cells within a tabular structure. A row contains one or more cells, grid cells or...
Read more >Table Options - Bootstrap Table
Detail: Enable expansion per row when detailView is set to true . Return true, and the row will be enabled for expansion, return...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

hello, @Bopzor
i think your case is because you try to set state for manage the row expand, however, it break the call of cell editing. But I think there’s still a workaround is trigger cell editing via expose api:
https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/exposed-api.html#trigger-cell-editing
Let me know if above solution is not work, I will figure out how to achieve your requirement. Thanks
I solved this using
On each column I wanted to NOT expand the row when clicked on , leaving the one I DID want the click to expand the row without that code.