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] visibleCount of virtual table is not reactive #1374

Closed
litt1e-p opened this issue Aug 10, 2022 · 11 comments
Closed

[Table] visibleCount of virtual table is not reactive #1374

litt1e-p opened this issue Aug 10, 2022 · 11 comments
Assignees

Comments

@litt1e-p
Copy link

tdesign-vue-next 版本

0.19.1

重现链接

https://stackblitz.com/edit/angular-kzfk22-um1jac?file=.stackblitzrc

重现步骤

  1. switch to demo page by click button
  2. scroll to the bottom by mouse dragging the scrollbar
  3. click higher height button and mouse drag the scrollbar near to the bottom. the extra spaces will come to the bottom of the table finally
  4. WeChatWork16600991233858.png

期望结果

no extra space exists

实际结果

it looks like visibleCount in src/hooks/useVirtualScroll.ts does not update as container offsetHeight updated, refreshContainer() should be called by refreshTable() after dom updated or other macro/micro task to be called.
refreshContainer only calls once in onMounted may be the reason I guess.

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

// src/table/base-table.tsx
// src/hooks/useVirtualScroll.ts
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 10, 2022

♥️ 有劳 @realyuyanan @Louiszhai @PengYYYYY @chaishi 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @litt1e-p

@litt1e-p
Copy link
Author

env info:

"vue": "^3.2.37"
"tdesign-vue-next": "^0.19.1"

@PengYYYYY PengYYYYY changed the title [Tree] visibleCount of virtual table is not reactive [Table] visibleCount of virtual table is not reactive Aug 12, 2022
@chaishi
Copy link
Collaborator

chaishi commented Aug 15, 2022

copy that

@github-actions
Copy link
Contributor

这个 Issue 被标记为了过时 stale ,因为它已经持续 30 天没有任何活动了。删除 stale 标签或评论,否则将在 7 天内关闭。

@litt1e-p
Copy link
Author

no fixed yet

@chaishi chaishi added the 🏃 in progress someone is developing label Dec 4, 2022
@chaishi
Copy link
Collaborator

chaishi commented Dec 4, 2022

当前虚拟滚动存在一些问题,由于原开发者已放弃维护,现换其他人维护。虚拟滚动要求如下,

  1. 支持不同高度
  2. 支持滚动到特定元素,方便 Select 等组件定位到选中元素
  3. 支持数据变化不重置,方便支持树形结构虚拟滚动

@litt1e-p
Copy link
Author

litt1e-p commented Dec 4, 2022

thanks

@chaishi
Copy link
Collaborator

chaishi commented Dec 5, 2022

resolved in #2112

下一个新版本会带上这个 feature(发布时间待定)

修复效果如下,

2022-12-05.10.19.25.mov

@litt1e-p
Copy link
Author

litt1e-p commented Dec 6, 2022

it is perfect, thank you for all your hard work

@chaishi
Copy link
Collaborator

chaishi commented Dec 14, 2022

published at v0.26.2

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

No branches or pull requests

4 participants