Open
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
-
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.
- A callback function like
-
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
/>