-
Notifications
You must be signed in to change notification settings - Fork 326
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
[Tree] 虚拟滚动高度问题 #2956
Labels
Comments
👋 @TeresaRd,感谢给 TDesign 提出了 issue。 |
huangchen1031
added a commit
to huangchen1031/tdesign-react
that referenced
this issue
Jul 18, 2024
16 tasks
uyarn
added
to be published
fixed, not be published
and removed
💭 discussion
we are discussing
to be published
fixed, not be published
labels
Aug 1, 2024
fixed 1.8.0, thanks for @huangchen1031 🌹 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tdesign-react 版本
1.7.5
重现链接
[复现链接](https://stackblitz.com/edit/react-gljdsw?file=src%2Fdemo.tsx)
重现步骤
<Tree
data={store.data}
hover
line
transition
scroll={{ type: 'virtual', isFixedRowHeight: true, rowHeight: 18, threshold: 200 }}
style={{ height: '600px' }}
load={load}
label={getLabel}
onClick={onClick}
/>
.t-tree__item {
height: 18px;
padding: 0 0 0 calc(var(--td-comp-margin-l) * var(--level));
.t-tree__label {
margin-left: 0;
padding: 0;
}
}
滚动一段距离后,底部出现六百,和设置的滚动高度不匹配
期望结果
在修改了Tree组件默认行样式后,指定了行高度,期望内容高度和设置的scroll height一致
实际结果
没有按指定的行高度计算虚拟滚动,改变了组件默认的样式后,就会出现内容高度与滚动高度不匹配的问题
框架版本
No response
浏览器版本
No response
系统版本
No response
Node版本
No response
补充说明
flex-grow: 1的div下的Tree组件,设置了虚拟滚动,高度600px,滚动后实际内容高度只有四百多
自定义样式:
.t-tree__item {
height: 18px;
padding: 0 0 0 calc(var(--td-comp-margin-l) * var(--level));
.t-tree__label {
margin-left: 0;
padding: 0;
}
}
The text was updated successfully, but these errors were encountered: