Open pacproduct opened 3 years ago
This is still a bug more than a year later with no comments.
This is still a bug more than a year later with no comments.
There is a workaround. Add one "fixed hidden" column to the first column object. If one of the columns is always hidden and rendered, then the toggle works.
Is this issue resolved? We are still facing the same issue One of the columns property is hidden: true but column is still displayed on render. Please help!
Workaround: You need at least one hidden column initially. I guess it's a bug đŸ˜
Describe the bug When switching from one set of columns with all visible columns to another set where one of them is flagged as
hidden
, the hidden column still shows up.To Reproduce Steps to reproduce the behavior:
Prepare 2 sets of columns, the second one having a hidden column. For instance:
Create a simple react component with a button for switching from one columns set to the other one, and displaying a bootstrap table with the currently active columns set. For instance:
Run the example (see codesandbox below): You should see the 3 columns from the first set of columns.
Click on the button for switching to the second columns set: Expected behavior: The table updates with the second set of columns which displays only 2 columns "Key" and "Type" as column "Description" has its property
hidden
set totrue
. Actual behavior: The table does update, but the column "Description" which has propertyhidden: true
is still displayed.Codesandbox Here is an example demonstrating the issue: https://codesandbox.io/s/react-boostrap-table-next-issue-when-hiding-a-column-hp6h7
Am I doing something wrong?