-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(table): fix table add resizable, turn page no save width #2575
Conversation
const cols = getColumns(columns); | ||
if (showExpandIconColumn) { | ||
cols.unshift(getExpandColumn()); | ||
} | ||
return cols; | ||
})(); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [columns, showExpandIconColumn]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处需添加 getColumns 中的更多依赖,如: tDisplayColumns
props.columnController
props.showSortColumnBgColor
props.sort
primaryTableRef.current?.tableContentRef
等等,可能需要再仔细确认下
方便的话,验证一下列配置、表头吸顶、虚拟滚动等场景是否正常
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,我验证一下。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以,我试试在分页触发的时候读取保存好的宽度
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以,我试试在分页触发的时候读取保存好的宽度
那你解决了,后面把我这个PR关闭就好
🤔 这个 PR 的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
Table组件,resizable开启后,翻页之后各列宽度未能保存。
使用useMemo来优化columns。
📝 更新日志
fix(table): 修复表格组件,可调整大小开启后,翻页之后各列宽度未能保存。
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单