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

[FR]: 期望sticky组件支持异步设置threshold且可以异步更新 #2310

Closed
DreamSeeker321 opened this issue May 31, 2024 · 0 comments · Fixed by #2564
Closed

[FR]: 期望sticky组件支持异步设置threshold且可以异步更新 #2310

DreamSeeker321 opened this issue May 31, 2024 · 0 comments · Fixed by #2564
Assignees

Comments

@DreamSeeker321
Copy link
Contributor

这个功能解决了什么问题?

sticky组件的threshold属性,当前只有在组件第一次渲染的时候,读取了设置的threshold,如果获取吸顶的高度是异步获取的,则后设置的值无法生效。
使用场景:
例1:sticky组件上方有内容是通过接口返回的,且存在是同样需要吸顶,当前的sticky组件就要把后显示的组件的区域留出来。
例2:页面是沉浸式的页面,在获取顶部隔离高度的时候是调用客户端获取顶部状态栏和导航栏高度的,异步返回的值设置后因为组件只在渲染的时候读取了threshold值,导致重新设置值不生效。

你期望的组件设计是怎样的?

组件属性中传入threshold属性,当其值变化的时候更新threshold的值。

@Alex-huxiyang Alex-huxiyang self-assigned this Sep 3, 2024
@Alex-huxiyang Alex-huxiyang linked a pull request Sep 3, 2024 that will close this issue
1 task
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

Successfully merging a pull request may close this issue.

2 participants