mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +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(
|
localStorage.setItem(
|
||||||
key,
|
key,
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
// 可显示列index
|
// 可显示列index, 原始配置中存在 toggled: false 的列不持久化
|
||||||
toggledColumnIndex: self.activeToggaleColumns.map(item => item.index),
|
toggledColumnIndex: self.activeToggaleColumns
|
||||||
|
.filter(item => !(item.pristine?.toggled === false))
|
||||||
|
.map(item => item.index),
|
||||||
// 列排序,name,label可能不存在
|
// 列排序,name,label可能不存在
|
||||||
columnOrder: self.columnsData.map(
|
columnOrder: self.columnsData.map(
|
||||||
item => item.name || item.label || item.rawIndex
|
item => item.name || item.label || item.rawIndex
|
||||||
|
Loading…
Reference in New Issue
Block a user