We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.10.5
https://codesandbox.io/p/sandbox/h3x8pz
访问:https://codesandbox.io/p/sandbox/h3x8pz
点击 Table2 后,Table2 的表尾显示效果应该与 Table1 一样。也就是如图
No response
Chrome(133.0.6943.59)
Window10(22H2)
The text was updated successfully, but these errors were encountered:
👋 @cdevq,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
这个问题已经定位到原因了,table在初始化后,会调用useEffect,动态计算表格滚动高度等变量,来动态设置isFixedHeader变量(暂且叫它悬浮变量),如果悬浮变量为true的时候,会在表格页脚(footer)上增加fixed定位的样式,这样咱们就能看到底部的总数表页脚了。
现在的问题是,楼主的这种写法,第二个TabPanel下的table在useEffect执行的时候,滚动高度为0(因为内容尚未初始化),导致悬浮变量是false,所以就看不到页脚。
至于楼主说的,此刻点击排序就能看到页脚汇总行,是因为排序会引起useEffect重新执行,此刻滚动高度是正常的数值(大于0),所以悬浮变量的值为true。
有一种快速解决的方案(以下为伪代码):
const [activeKey, setActiveKey] = useState(); TabPanel onChange={key=>setActiveKey(key)} TableAffixDemo activekey={activeKey}
通过切换Tab的时候,强制更新组件的方式可暂时解决问题。
至于本组件的代码修复,我来跟进吧。
fix(table): 修复tabs切换的时候表格table的footer可能不显示的问题
7dda4b0
修复tabs切换的时候表格table的footer可能不显示的问题 fix Tencent#3365
e917392
No branches or pull requests
tdesign-react 版本
1.10.5
重现链接
https://codesandbox.io/p/sandbox/h3x8pz
重现步骤
访问:https://codesandbox.io/p/sandbox/h3x8pz
期望结果
点击 Table2 后,Table2 的表尾显示效果应该与 Table1 一样。也就是如图
实际结果
No response
框架版本
No response
浏览器版本
Chrome(133.0.6943.59)
系统版本
Window10(22H2)
Node版本
No response
补充说明
No response
The text was updated successfully, but these errors were encountered: