Skip to content
Source
Sign inSign up
TanStack/virtual

feat(solid-virtual): improve Solid adapter #790

Openmartinpengellyphillips(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/790/headopened

Showing 1 changed file with 4 additions and 5 deletions.

x
0 of 1 viewed, 1 left
4 additions and 5 deletionspackages/solid-virtual/src/index.tsxModified
View file
@@ -9,7 +9,7 @@
} from '@tanstack/virtual-core'
​
import {
- createComputed,
+ createEffect,
createSignal,
mergeProps,
onCleanup,
@@ -55,22 +55,19 @@
​
const virtualizer = new Proxy(instance, handler)
- virtualizer.setOptions(resolvedOptions)
​
onMount(() => {
const cleanup = virtualizer._didMount()
- virtualizer._willUpdate()
onCleanup(cleanup)
})
​
- createComputed(() => {
+ createEffect(() => {
virtualizer.setOptions(
mergeProps(resolvedOptions, options, {
onChange: (
instance: Virtualizer<TScrollElement, TItemElement>,
sync: boolean,
) => {