Virtual doesn't load items when displayed in a dialog
Hello everyone,
I'm working on a feature to show user's list of followers. Since I use shadcn I decided to display that list inside a dialog (https://ui.shadcn.com/docs/components/dialog ) and inside the dialog content to use @tanstack/virtual. However, when I open that dialog the items aren't displayed (height is calculated properly). Only when I switch the screen/tab I get the elements.
I've found this issue on github: https://github.com/TanStack/virtual/issues/263 however, using a
You can see the behaviour on the provided video.
Relevant project info:
I'm working on a feature to show user's list of followers. Since I use shadcn I decided to display that list inside a dialog (https://ui.shadcn.com/docs/components/dialog ) and inside the dialog content to use @tanstack/virtual. However, when I open that dialog the items aren't displayed (height is calculated properly). Only when I switch the screen/tab I get the elements.
I've found this issue on github: https://github.com/TanStack/virtual/issues/263 however, using a
ref callback din't help much. You can see the behaviour on the provided video.
Relevant project info: