olifolkerd / tabulator

Interactive Tables and Data Grids for JavaScript
http://tabulator.info
MIT License
6.63k stars 813 forks source link

Responsive with show/hide column(s) don't work properly #4568

Open alixcertem opened 1 month ago

alixcertem commented 1 month ago

Describe the bug When you show or hide column when table columns are collapsed, the responsive don't work. The column to show is added at the end of table instead and an horizontal scrollbar is add. Moreover you can see twice name column in collapsed list.

Tabulator Info

Working Example https://jsfiddle.net/y75892fq/2/

To Reproduce A step by step guide to recreate the issue in your JS Fiddle or Codepen:

  1. Reduce the window size
  2. Click on the expand button
  3. Click on show
  4. See error : twice column name and horizontal scrollbar

Expected behavior Behavior must be : Delete one of two same columns when you expand responsive, and delete horizontal scrollbar when you show/hide column to fit with table width.

Screenshots image

Desktop (please complete the following information):

kermit-the-frog commented 1 week ago

He're is another fiddle related to this problem:

Describe the bug Responsive with show/hide columns don't work properly

Tabulator Info 6.2.5

Working Example https://jsfiddle.net/Kermit_the_frog/c6u0zdgL/13/

To Reproduce A step by step guide to recreate the issue in your JS Fiddle or Codepen:

  1. Go to https://jsfiddle.net/Kermit_the_frog/c6u0zdgL/13/
  2. Click on the header menu of any column
  3. See error: columns that are only collapsed don't have a check mark, because column.isVisible() returns false
  4. Click on a checkbox for a collapsed column
  5. See error: column is a non collapsed column now
  6. Resize browser/table width
  7. See error: that column will not collapse

Expected behavior

  1. All columns that are visible (either as a table column or in the collapsed columns list) should have a check mark in the header menu. Any invisible column should have no check mark.
  2. If I hide a column via the header menu, it should not be visible at all. If I show a column via the header menu it should be visible either as a table column or in the collapsed column list.

Desktop (please complete the following information):