chatscope / chatscope/chat-ui-kit-react

scrollbar stays at the top when infinite scrolling

Open
#26 26 comments 1 reaction 1 assignee Claimed by @supersnager View on GitHub
bug good first issue
Dominant language
JavaScript
Stars
1.8k
Forks
154
PR merge metrics
No merged PRs in 30d

Description

hey, thanks for the great package!

i'm using infinite scrolling on the `MessageList` component like this:
```

```

but when more messages are loaded, the scrollbar is still at the top of the container so it just keeps calling `loadMore` over and over. ideally the behaviour would be something like this:

before onYReachStart is called:
```
message4 <-----scroll to here
message5
message6
```

after onYReachStart is called:
```
message1
message2
message3
message4 <-----scroll bar is here
message5
message6
```

so that only the next page of messages is fetched, rather than continually fetching more pages until you manually scroll down. hope that makes sense!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.