We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在 ListView 中使用时,传过来的 getScrollContainer 第一次必然得到 undefined,第二次渲染才会使用 ListView 提供的 container,且第二次渲染不会自动触发,在 onTouchMove 等事件产生导致重新渲染时会导致 DOM 结构整体变化,以及 children 被重新创建 / 渲染。
ListView
getScrollContainer
undefined
onTouchMove
m-pull-to-refresh/src/PullToRefresh.tsx
Line 297 in e60268f
相关:#171
复现:https://clxjt.csb.app/
workaround:
const MyPullToRefresh = ({ getScrollContainer, ...props }) => ( <PullToRefresh getScrollContainer={() => getScrollContainer?.() || true} {...props} /> );
由于 getScrollContainer 被 ListView 覆盖了,因此只能自己包一个 MyPullToRefresh,保证返回值非 undefined。
MyPullToRefresh
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在
ListView
中使用时,传过来的getScrollContainer
第一次必然得到undefined
,第二次渲染才会使用ListView
提供的 container,且第二次渲染不会自动触发,在onTouchMove
等事件产生导致重新渲染时会导致 DOM 结构整体变化,以及 children 被重新创建 / 渲染。m-pull-to-refresh/src/PullToRefresh.tsx
Line 297 in e60268f
相关:#171
复现:https://clxjt.csb.app/
workaround:
由于
getScrollContainer
被ListView
覆盖了,因此只能自己包一个MyPullToRefresh
,保证返回值非undefined
。The text was updated successfully, but these errors were encountered: