Skip to content
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

[Table] empty内容的居中方式,无法适应Table宽度的变化 #1319

Closed
tustzdm opened this issue Aug 17, 2022 · 10 comments
Closed

[Table] empty内容的居中方式,无法适应Table宽度的变化 #1319

tustzdm opened this issue Aug 17, 2022 · 10 comments
Labels
to be published fixed, not be published

Comments

@tustzdm
Copy link

tustzdm commented Aug 17, 2022

tdesign-react 版本

0.40.3

重现链接

https://codesandbox.io/s/tdesign-react-demo-forked-894el4?file=/src/demo.jsx

重现步骤

见codesandbox

期望结果

empty居中

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

@github-actions
Copy link
Contributor

👋 @tustzdm,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

♥️ 有劳 @yunfeic @tengcaifeng @Yacent @basecss 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @tustzdm

@chaishi
Copy link
Collaborator

chaishi commented Aug 17, 2022

经过确认,确实有问题,没有动态处理宽度,我来处理下

2022-08-17.8.25.57.mov

@chaishi
Copy link
Collaborator

chaishi commented Aug 17, 2022

其实,不仅仅是 Empty 元素,还有吸顶表头或者表尾,很多其他的元素,都是依赖数据变化更新 DOM。

单纯的外层 div 变化,难以检测。所以会存在部分场景不更新的情况,希望框架哪天能出一个监听 DOM 变化的特性。

为解决实际业务问题,组件会提供 refreshTable 实例方法,以便于在特殊场景中,刷新表格

@chaishi
Copy link
Collaborator

chaishi commented Aug 17, 2022

@chaishi chaishi added the to be published fixed, not be published label Aug 21, 2022
@chaishi
Copy link
Collaborator

chaishi commented Aug 21, 2022

#1312

这个 PR 中已新增对外实例方法,refreshTable

@honkinglin
Copy link
Collaborator

0.40.4 fixed

@chaishi
Copy link
Collaborator

chaishi commented Sep 2, 2022

https://caniuse.com/?search=MutationObserver

可以使用这个特性监听 DOM,变化,我们修复一下这个问题

@chaishi
Copy link
Collaborator

chaishi commented Sep 2, 2022

resolved in #1420 修复效果如下方视频所示

2022-09-02.8.59.37.mov

@honkinglin
Copy link
Collaborator

0.40.6 fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

3 participants