react-bootstrap-table2 icon indicating copy to clipboard operation
react-bootstrap-table2 copied to clipboard

[Bug] Expand Indicator is Always Shown For All Rows

Open lykaiowang opened this issue 7 years ago • 2 comments

Version: 1.1.4
Context:
  • <BootstrapTable /> takes a configuration prop expandRow
  • expandRow object takes a few keys, three of which are nonExpandable and expandColumnRenderer, 'showExpandColumn`
  • showExpandColumn is a boolean that dictates whether or not Expand Indicators are shown
  • nonExpandable is an array of keyFieldss dictating which rows aren't expandable
  • expandColumnRenderer is a rendering function that renders the Expand Indicator
Issue:
  • The Expand Indicator renders with out respecting nonExpandable rows. i.e. it renders for all rows, even if it isn't expandable.

lykaiowang avatar Sep 14 '18 17:09 lykaiowang

@lykaiowang sorry for lately reply, I will look into on it and thanks your contribution.

AllenFang avatar Sep 17 '18 14:09 AllenFang

This bug is still present in

"react-bootstrap-table-next": "4.0.3",
"react-bootstrap-table2-editor": "1.4.0",
"react-bootstrap-table2-filter": "1.3.3",
"react-bootstrap-table2-overlay": "2.0.0",
"react-bootstrap-table2-paginator": "2.1.2",
"react-bootstrap-table2-toolkit": "2.1.3"

The index array which is passed to nonExpandable seems to have no effect on which rows can or cannot be expanded.

Also rowKey returned from expandColumnRenderer is always undefined and expandable is always true.

adamistheanswer avatar Jan 22 '21 16:01 adamistheanswer