fix(frontend): scrollToIndex smooth option uses behavior property
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions

TanStack Virtual uses 'behavior' for scroll animation, not 'smooth'.
This commit is contained in:
ZhenYi 2026-04-26 13:31:11 +08:00
parent 6eb65a5c65
commit 99ebfc14a7

View File

@ -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