未验证 提交 f05cc6d3 编写于 作者: Q qinjiahui01 提交者: GitHub

fix(useColumn): fixed table column changes with hidden columns disappearing after dropping (#453)

Co-authored-by: NAlan <alan@ichestnuts.com>
上级 8b5cbca3
......@@ -207,6 +207,11 @@ export function useColumns(
...item,
defaultHidden: false,
});
} else {
newColumns.push({
...item,
defaultHidden: true,
});
}
});
......@@ -214,8 +219,8 @@ export function useColumns(
if (!isEqual(cacheKeys, columns)) {
newColumns.sort((prev, next) => {
return (
columnKeys.indexOf(prev.dataIndex as string) -
columnKeys.indexOf(next.dataIndex as string)
cacheKeys.indexOf(prev.dataIndex as string) -
cacheKeys.indexOf(next.dataIndex as string)
);
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册