Svelte Tanstack Virtual ctx[34] is undefined

When I try to use the proper length of the rows, it breaks table and gives ctx[34] error is undefined. projectTotalRows does contain a value. Verified through console logging and even an if statement for it existing.

This works
    $: visualizer = parentElement
        ? createVirtualizer({
                count: data.length,
                getScrollElement: () => parentElement,
                estimateSize: () => estimateSize,
                overscan: 50,
          })
        : null;


This does not (I need this)
    $: visualizer = parentElement
        ? createVirtualizer({
                count: projectTotalRows,
                getScrollElement: () => parentElement,
                estimateSize: () => estimateSize,
                overscan: 50,
          })
        : null;


Anyone able to give any additional information as to what the error message means? It can't be that the variable doesn't exist, because I've even tried this:
(This also gives the same ctx[34] error).
    $: visualizer = parentElement
        ? createVirtualizer({
                count: 764,
                getScrollElement: () => parentElement,
                estimateSize: () => estimateSize,
                overscan: 50,
          })
        : null;
image.png
Was this page helpful?