Room List: Scroll to top of the list when active room is not in the list (#29650)

* Scroll to top when active room is not in list

So that when filters are applied and the active room is not in the list
anymore, the list is scrolled to the top.

* Write test
This commit is contained in:
R Midhun Suresh
2025-04-02 15:45:24 +05:30
committed by GitHub
parent 92b85fcb13
commit 55f1c27184
2 changed files with 56 additions and 9 deletions

View File

@@ -43,7 +43,7 @@ export function RoomList({ vm: { rooms, activeIndex } }: RoomListProps): JSX.Ele
rowHeight={48}
height={height}
width={width}
scrollToIndex={activeIndex}
scrollToIndex={activeIndex ?? 0}
/>
)}
</AutoSizer>