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
569 stars 162 forks source link

Grid does not recreate its columns collection after data change #14315

Closed hanastasov closed 1 month ago

hanastasov commented 4 months ago

Steps to reproduce

  1. Add grid with autoGenerate set to true
    1. In ngOnInit, set this.grid.shouldGenerate = true

Result 1: See console: image

  1. Change the collection that is bound to the grid data property
    this.data = this.data3;

Result

Grid does not recreate its columns based on the new data bound to the data input property

Expected result

Grid to recreate its columns based on the new data bound to the data input property and No errors to be thrown initially.

hanastasov commented 4 months ago

Changing autoGenerate to true just before changing the data works:

        this.grid1.shouldGenerate = true;
        this.data = this.data3;