ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.3k stars 1.36k forks source link

🐛 fix(proTable): 将Table columnsState storageValue覆盖defaultValue #8267

Closed MachiBarton closed 7 months ago

MachiBarton commented 7 months ago

实际生产中,defaultValue往往作为系统方默认配置,则优先级不应高于用户配置的storageValue。 否则会出现在设置defaultValue后用户无论如何修改都无法获取自己配置的效果 #8204

原有代码 if (storageValue) { if (props?.columnsState?.defaultValue) { return merge( JSON.parse(storageValue), props?.columnsState?.defaultValue, ); } return JSON.parse(storageValue); }

github-actions[bot] commented 7 months ago

⚡️ Deploying PR Preview...