Skip to content

Commit

Permalink
fix: 开启持久化后列顺序失效问题
Browse files Browse the repository at this point in the history
  • Loading branch information
chenliandong committed Jan 7, 2025
1 parent e43ee94 commit 246941c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hooks/useLocalColumns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ function mergeColumns<T extends ResizableColumnType[]>(src: T, target: T, mergeK
const resDataIndex = Array.isArray(res[i].dataIndex) ? res[i].dataIndex.join('-') : res[i].dataIndex
return targetDataIndex === resDataIndex
})?.[mergeKey] || res[i][mergeKey]
// {} 有可能修改成 { [mergeKey]: undefined },影响 Table.SELECTION_COLUMN 和 Table.EXPANDABLE_COLUMN 的判断
if (res[i][mergeKey] === undefined) {
delete res[i][mergeKey]
}
}
})
}
Expand Down

0 comments on commit 246941c

Please sign in to comment.