Skip to content

Commit

Permalink
fix: no scroll when there is no items
Browse files Browse the repository at this point in the history
  • Loading branch information
johann-crabnebula committed Feb 7, 2024
1 parent f21226a commit c9b8e6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clients/web/src/components/auto-scroll-pane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export function AutoScrollPane<AutoScrollItem>(
);

createEffect(() => {
if (props.shouldAutoScroll())
console.log(props.dataStream);
if (props.shouldAutoScroll() && props.dataStream.length > 0)
virtualizer().scrollToIndex(props.dataStream.length - 1);
});

Expand Down

0 comments on commit c9b8e6a

Please sign in to comment.