ag-gridag-grid-angular

After upgrading to Ag-grid 30 I have a problem with the moveColumns function


I upgraded ag grid version from 27 to 30 and now columnApi.moveColumns function does not work for me as it used to. The function does not seem to change the order.

I think I was able to reproduce the situation in this Plnkr In my case the code is

this.gridColumnApi.moveColumns(['selected', 'ag-Grid-AutoColumn'], 0);

But I modified an aggrid code example to resemble what I'm trying to do.

Thanks in advance.


Solution

  • setTimeout solved the problem

    setTimeout(() => this.gridColumnApi.moveColumns(['selected', 'ag-Grid-AutoColumn'], 0));