IgniteUI / igniteui-angular

Ignite UI for Angular is a complete library of Angular-native, Material-based Angular UI components with the fastest grids and charts, Pivot Grid, Dock Manager, Hierarchical Grid, and more.
https://www.infragistics.com/products/ignite-ui-angular
Other
568 stars 159 forks source link

[Elements] Grid state persistence does not properly restore column features #14284

Open ddaribo opened 1 month ago

ddaribo commented 1 month ago

Description

After investigating this issue, it was determined that the column features state is not properly restored on the Elements grids (Flat, Tree, Hierarchical, Pivot). Moreover, this is only consistently observed when restoring the state within the embedded samples in the documentation page, for example:

wc-grid-state-issue-demo

This is the case on initial loading - the sample is configured to restore the state on the windows's load event, which fires as expected. When clicking the "Restore" button, the grid being all rendered, the columns' state is restored as expected.

On the other hand, opening the same sample in a separate window and performing the same steps results in successfully restoring the columns state. Although this is rather inconsistent - on several occasions the behavior is reproduced there as well. Possibly some timing issue, where the grid columns are reinitialized under certain conditions after the state had been restored, thus overriding it.

I have not been able to isolate this behavior for the IgxGrid, so it is to be investigated whether this is related to the Elements grids only and how they are initialized, or is coming from the IgxGrid and is reproducible under certain specific conditions?

Steps to reproduce

  1. Make changes to the columns - hide, pin, etc.
  2. Click "Save"
  3. Click "Leave"/ Reload the page
  4. Click "Go Back"
  5. Columns are restored to initial settings. Features like filtering or selection are properly restored.

Result

Described above.

Expected result

Properly restore everything on initialization.

Attachments