fix(frontend): scrollToIndex smooth option uses behavior property
TanStack Virtual uses 'behavior' for scroll animation, not 'smooth'.
This commit is contained in:
parent
6eb65a5c65
commit
99ebfc14a7
@ -200,7 +200,7 @@ export const MessageList = memo(function MessageList({
|
||||
|
||||
const scrollToBottom = useCallback((smooth = true) => {
|
||||
if (rows.length === 0) return;
|
||||
virtualizer.scrollToIndex(rows.length - 1, { align: 'end', smooth });
|
||||
virtualizer.scrollToIndex(rows.length - 1, { align: 'end', behavior: smooth ? 'smooth' : 'auto' });
|
||||
}, [virtualizer, rows.length]);
|
||||
|
||||
// Ensure scroll-to-bottom fires after virtualizer measures all rows
|
||||
|
||||
Loading…
Reference in New Issue
Block a user