fix chat list and member list

This commit is contained in:
2024-11-23 07:42:26 +02:00
parent dc104d1539
commit c777bfe245
8 changed files with 33 additions and 15 deletions

View File

@@ -34,12 +34,13 @@ export const ChatList = ({
const hasLoadedInitialRef = useRef(false);
const scrollingIntervalRef = useRef(null);
// Initialize the virtualizer
const rowVirtualizer = useVirtualizer({
count: messages.length,
getItemKey: (index) => messages[index].signature,
getScrollElement: () => parentRef?.current,
estimateSize: () => 80, // Provide an estimated height of items, adjust this as needed
estimateSize: useCallback(() => 80, []), // Provide an estimated height of items, adjust this as needed
overscan: 10, // Number of items to render outside the visible area to improve smoothness
});