-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Fixed didn't update fluid width when table was mounted #433
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 3a5c14d:
|
新的应该可以了 |
@fallenleavesguy 你可以通过以下几种方式,安装当前 PR 的 rsuite-table,看看是否修复你业务中遇到的问题?
|
@simonguo 我是直接依赖的rsuite,没办法直接切换到rsuite-table, 我在rsuite-table的demo里也重现出来了,修好了 |
useMount(() => { | ||
clearCache(); | ||
}); | ||
|
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.
表格的 width 计算是在 useTableDimension 的 useMount 中完成的,按理这里 clearCache 是清除单元格配置信息,怎么能解决你当前遇到的问题,我很好奇。
https://github.com/rsuite/rsuite-table/blob/main/src/utils/useTableDimension.ts#L252
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.
在这里 clearCache()
上添加个注释.
// As the cells are cached before the table width is updated, it is necessary to clear the cache again. fix: #430
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.
同意提交了
急急急,在线等😱😱😱🫣 |
add comment to explain clearCache in useMount Co-authored-by: Simon Guo <[email protected]>
要上线了,急急急🥺😭 |
Fixed didn't update fluid width when table was mounted