TanStackT
TanStackโ€ข3y agoโ€ข
4 replies
technological-jade

RTL unit tests with tanstack virtual

Hey Guys ! ๐Ÿ‘‹

I am facing one strange issue, when implementing the tanstack virtual. const items = virtualizer.getVirtualItems(); the items is empty and not rendering any items, because of which unit test is failing.

On console, I found the DOM structure like this:

<div
  style="height: 90px; width: 100%; position: relative;"
>
  <ul
    class="css-17yo06k"
    role="list"
    style="position: absolute; top: 0px; left: 0px; width: 100%; transform: translateY(0px);"
  /> // <==== empty ul
</div>


I am using version 3.0.0-beta.68

I tried to applied waitFor as well in order to wait if list re render, but no luck. has anyone faced this issue ? Could you please help me understand how to resolve it ? Thanks !
Was this page helpful?