Skip to content

antd-mobile的InfiniteScroll 无限滚动碰到antd的table组件的scroll属性会触发无限滚动刷新,是否有办法规避? #5398

Answered by GOWxx
githubqh asked this question in Q&A
Discussion options

You must be logged in to vote

非常感谢,但是如果去掉scroll属性,表格向下拉的时候就不能固定表头了,还有其他办法嘛?

又改了下,可以看看这个 demo
思路是想办法把 <InfiniteScroll /> 放入 <Table /> 内的底部

      <Table
        scroll={{ y: 450 }}
        summary={() => (
          <div>
            <InfiniteScroll threshold={0} />
          </div>
        )}
      />

我目前看到 summary 比较合适
或者有任何其他能让它置于表格最后一行的办法应该都可以。

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@githubqh
Comment options

@GOWxx
Comment options

@githubqh
Comment options

Comment options

You must be logged in to vote
1 reply
@githubqh
Comment options

Answer selected by githubqh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #5397 on June 24, 2022 06:34.