Skip to content

"Feature Request: Infinite Scroll Up Support for bubble.list" #367

Open
@iaminnasr

Description

需求动机

Description

It would be a great enhancement to add infinite scroll upwards support for bubble.list. This is especially useful for chat applications or similar use cases where users scroll up to load older content.

Currently, bubble.list supports regular infinite scrolling downwards, but there is no built-in support for upwards scrolling.


Use Case

For chat-based applications or timelines, when users reach the top of the scroll container, they expect older data to load seamlessly. Implementing infinite scroll upwards will greatly improve user experience.


Expected Behavior

  1. When the user scrolls to the top of the bubble.list:

    • A callback function like onScrollUp is triggered.
    • New data is fetched and prepended to the list without shifting the scroll position abruptly.
  2. Maintain the current scroll position to avoid user confusion.


提议的 API 是什么样的?

Proposed API

Add a prop like:

<bubble.list
onLoadMore={onLoadMore}
  hasMoreUp={true} // Whether there is more data to load upwards
  loadingUp={isLoading} // Show loading indicator
/>

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions