首页 > 解决方案 > enableRtl = true 时 rowGrouped 项的 applyColumnState 不正确

问题描述

我正在使用 enableRtl: true 属性,我想保存网格状态。在 enableRtl: true 中,第一列在索引为 0 的右侧,我用它来对行进行分组。我保存了这个网格状态,但是在加载它时,只有这一列移动到左侧而不是右侧,因为 rowGroupIndex = 0 !!

现在有什么办法可以解决我的问题吗?

// 保存代码

localStorage[this.gridUniqueKey] = JSON.stringify(gridOptions.columnApi.getColumnState());

// 加载

columnState = JSON.parse(localStorage[this.gridUniqueKey]);    
gridOptions.columnApi.applyColumnState({
            state: columnState,
            applyOrder: true,
        });

标签: angularag-gridag-grid-angular

解决方案


推荐阅读