Skip to content

Svelte: setting count does not re-render correctly #969

Open
@nordfjord

Description

@nordfjord

Describe the bug

The virtual list is not updated after setting the count option

Your minimal, reproducible example

https://svelte.dev/playground/61de6ef02eee43088d2ee0482cbe21d3?version=5.25.3

Steps to reproduce

given a scroll area larger than the list it includes
when count is updated
then nothing happens.

Expected behavior

I would've expected the list to rerender with the updated count, showing new items.

This seems to be resolved by calling $virtualizer.measure() after the setOptions call.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

MacOS, Chromium

tanstack-virtual version

v3.13.5

TypeScript version

No response

Additional context

No response

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions