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表格] 表格组件的scrollToElement能否在未开启虚拟滚动场景也能使用? #4823

Open
Brokenstrings opened this issue Dec 9, 2024 · 2 comments
Labels
💪🏻 enhancement New feature or request 🏃 in progress someone is developing

Comments

@Brokenstrings
Copy link

这个功能解决了什么问题

目前scrollToElement方法好像只有在表格开启了虚拟滚动场景下才能使用,开启虚拟滚动好像有一定的性能开销,默认是大于等于100条的时候开启,所以小数据量的时候开启这个也没必要,不开又不能使用这个scrollToElement,还需要自己改造一番,如果你们能把这个在没启用虚拟滚动的时候也呢个用就好了。

你建议的方案是什么

目前我们是判断数据量如果大于虚拟滚动开启阈值使用scrollToElement,小于部分先获取表格到滚动行的总行高,然后使用scrollTo滚动到大概位置。这样写需要些很多冗余代码,如果你们框架内部能直接处理这样我们用起来也很方便。

Copy link
Contributor

github-actions bot commented Dec 9, 2024

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

@uyarn uyarn added the 💪🏻 enhancement New feature or request label Dec 9, 2024
@uyarn
Copy link
Collaborator

uyarn commented Dec 10, 2024

可以调整下

@uyarn uyarn added the 🏃 in progress someone is developing label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪🏻 enhancement New feature or request 🏃 in progress someone is developing
Projects
None yet
Development

No branches or pull requests

2 participants