mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: table 添加 toggled: false 的列不参与持久化存储 (#5236)
Co-authored-by: tooeast <liuzedong02@baidu.com>
This commit is contained in:
parent
4154368e98
commit
e7c909b277
@ -1337,8 +1337,10 @@ export const TableStore = iRendererStore
|
||||
localStorage.setItem(
|
||||
key,
|
||||
JSON.stringify({
|
||||
// 可显示列index
|
||||
toggledColumnIndex: self.activeToggaleColumns.map(item => item.index),
|
||||
// 可显示列index, 原始配置中存在 toggled: false 的列不持久化
|
||||
toggledColumnIndex: self.activeToggaleColumns
|
||||
.filter(item => !(item.pristine?.toggled === false))
|
||||
.map(item => item.index),
|
||||
// 列排序,name,label可能不存在
|
||||
columnOrder: self.columnsData.map(
|
||||
item => item.name || item.label || item.rawIndex
|
||||
|
Loading…
Reference in New Issue
Block a user