Responsive Bug on Hidden Columns

Responsive Bug on Hidden Columns

jeranUjeranU Posts: 11Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
I have a responsive table, when I scale the window down enough for the responsive table to trigger and the expand toggle icon appears; I expand the hidden columns then scale the window back up. The toggle option goes away but the expanded columns still show in addition to the columns added back into the table.

steps to replicate:
1. use a responsive table
2. shrink the page enough to trigger columns hiding and the expand column icon to show
3. click the expand column icon
4. enlarge the window until the table is full again

Expected:
* the expanded columns that displayed under the responsive design go away and are added back to the table

Actual:
* the columns still show under the "expanded" column and they also show in the table

I had these versions when it was working last:
datatables.net 2.3.8
datatables.net-bs5 2.3.8
datatables.net-buttons 3.2.6
datatables.net-buttons-bs5 3.2.6
datatables.net-responsive 3.0.8
datatables.net-responsive-bs5 3.0.8

current versions with the bug:
datatables.net 3.0.0
datatables.net-bs5 3.0.0
datatables.net-buttons 4.0.0
datatables.net-buttons-bs5 4.0.0
datatables.net-responsive 4.0.0
datatables.net-responsive-bs5 4.0.0

Answers

  • jeranUjeranU Posts: 11Questions: 1Answers: 0

    Here is a working example of the problem with just the responsive portion enabled: https://live.datatables.net/gebanifo/2/edit

  • allanallan Posts: 65,884Questions: 1Answers: 10,960 Site admin

    Hi,

    Many thanks for the detailed instructions and test case. You are absolutely right, and I've committed a fix here. The error came about due to the TypeScript conversion and I had an error in the type for row().child(), so I put a guard in for it, resulting in the issue.

    I'll tag up the release either later today, or more likely tomorrow.

    Regards,
    Allan

  • jeranUjeranU Posts: 11Questions: 1Answers: 0

    Thank you very much!

Sign In or Register to comment.