feat!: switch to column hidden property and always keep all columns - #1299
Conversation
|
first v6 PR, notice that we're merging to the new branch |
|
Honestly I thought all this was done a year or more ago. As long as it's all consistent, this is no problem at all. |
|
@6pac yes and no, you did bring this up, but it wasn't working correctly because you can't mix both together you have to go all-in for it to work correctly. This is especially true for the Column Picker/Grid Menu, if you look at those 2 then you'll see a lot of code drop but that wouldn't be possible until you go all-in... Also what I mean by all-in is to change the behavior of |
|
Good by me. Happy to merge? |
Changes
This is a breaking change replicated from Slickgrid-Universal PR #2281 and its applicable regression fixes.
Column visibility now uses the
hiddenproperty while the grid always retains the complete column definitions list.Breaking changes
grid.getColumns()now returns all columns, including hidden columns.Use
grid.getVisibleColumns()when only visible columns are required.grid.setColumns()now expects the complete column list.Column visibility should be changed with:
Column Picker, Column Menu, grouping, selection, state persistence, and Excel copy behavior were updated for hidden columns.
Colspan and rowspan rendering/navigation were updated to account for hidden columns.
Regression fixes
This also includes the applicable follow-up fixes from:
Migration example
Before:
After:
Use
grid.getVisibleColumns()instead of filtering the result ofgetColumns()manually.Validation
This follows the original migration rationale: retain the full column list and use
hiddenfor visibility. Below is the original PR description