You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CLNP-7850]Add feature to scroll to top of new message instead of bottom (#1378)
// PR title (Required)
[feat]: Add feature to scroll to top of new message instead of bottom
// PR description (Optional)
Added `isFocusOnLastMessage` as a prop to `SendbirdProvider`.
If this prop is set to true, then when a new message arrives and its
height exceeds the screen, the scroll position will not automatically
jump to the bottom. Instead, it will move to the top position of that
new message.
// Footer (Recommended)
feat [CLNP-7850](https://sendbird.atlassian.net/browse/CLNP-7850)
### Changelogs
- Added a new `isFocusOnLastMessage` prop to `SendbirdProvider`
When set to true, if a newly received message is taller than the
viewport, the scroll position will not auto-jump to the bottom.
Instead, the view scrolls to the top of the new message, keeping the
start of the message in focus.
### Checklist
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If unsure, ask the members.
This is a reminder of what we look for before merging your code.
- [x] **All tests pass locally with my changes**
- [ ] **I have added tests that prove my fix is effective or that my
feature works**
- [ ] **Public components / utils / props are appropriately exported**
- [ ] I have added necessary documentation (if appropriate)
## External Contributions
[CLNP-7850]:
https://sendbird.atlassian.net/browse/CLNP-7850?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
0 commit comments