英文:
After upgrading to Ag-grid 30 I have a problem with the moveColumns function
问题
I upgraded ag-Grid 版本从27升级到30,现在columnApi.moveColumns函数不再像之前那样对我起作用。该函数似乎没有改变顺序。
我认为我能够在这个Plnkr中重现这种情况。
在我的情况下,代码是
this.gridColumnApi.moveColumns(['selected', 'ag-Grid-AutoColumn'], 0);
但我修改了一个ag-Grid的代码示例,以模仿我试图做的事情。
提前谢谢。
英文:
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.
答案1
得分: 0
setTimeout解决了这个问题
setTimeout(() => this.gridColumnApi.moveColumns(['selected', 'ag-Grid-AutoColumn'], 0));
英文:
setTimeout solved the problem
setTimeout(() => this.gridColumnApi.moveColumns(['selected', 'ag-Grid-AutoColumn'], 0));
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论