You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use `createEffect` to ensure scrollElement ref is connected to DOM
and ownerDocument/window before attempting to update measurements
for it. Otherwise, `virtualizer.targetWindow` will be set to null
(in _willUpdate), the scrollElement rect to nothing and no items
will be displayed.
In addition, remove some logic that causes redundant work to be
done (e.g. `setOptions` called multiple times, `_willUpdate`
called on mount which is a no-op if the scollElement didn't change). Instead rely on the options reactivity to perform the
bulk of the work.
Also, reset virtual items store when options change to ensure that
reactivity is maintained - e.g. so that `measureItem` is called
again in a `<For>` loop if `scrollMargin` changed.
0 commit comments