Datatable, showColumn Bug

I don’t have any snippet.

  1. you have N columns in a datatable
  2. you save the state of the datatable.

you edit the code

  1. Add a column in the array

Refresh the page.

  1. load the saved state
  2. hide the Column X (any) => works
  3. show the hidden column X => bug

Here is the bug in the console

showColumn: invalid ID or already visible

Good day @Alexandre_Nicolas,

The State contains limited information about the existing columns (count, size, show/hidden state).
This behavior isn’t a bug. After adding a new column, the old state will not match the table configuration and you shouldn’t restore such a state.

You need to update the State while you adding a column. You can get the old State and add information about the new column to it: Code Snippet

Thanks a lot.
Webix can’t be beaten

1 Like