createVirtualizerBase calls virtualizer.measure() after every reactive option update.
In core, measure() is full invalidation: it clears itemSizeCache and lane assignments, increments the cache version, then notifies. A count update therefore discards valid dynamic measurements and temporarily returns affected items to estimateSize.
Minimal case:
- Create a Solid virtualizer with
count = 2 and estimateSize = 60.
- Call
resizeItem(0, 100).
- Reactively set
count = 3.
itemSizeCache.get(0) is now undefined; total size is rebuilt from estimates.
This differs from the other adapters:
- React:
setOptions() during render, _willUpdate() after commit.
- Vue:
setOptions(), _willUpdate(), triggerRef().
- Svelte:
setOptions(), _willUpdate(), explicit store publication.
Solid should use lifecycle update plus explicit framework publication rather than measure():
virtualizer._willUpdate()
setVirtualItems(reconcile(instance.getVirtualItems(), { key: "index" }))
setTotalSize(instance.getTotalSize())
This preserves measured sizes while still publishing count/total-size changes when core does not emit onChange.
Dynamic invalidation for options such as gap, orientation, or estimate strategy should remain core-owned rather than relying on adapter-level full invalidation.
createVirtualizerBasecallsvirtualizer.measure()after every reactive option update.In core,
measure()is full invalidation: it clearsitemSizeCacheand lane assignments, increments the cache version, then notifies. A count update therefore discards valid dynamic measurements and temporarily returns affected items toestimateSize.Minimal case:
count = 2andestimateSize = 60.resizeItem(0, 100).count = 3.itemSizeCache.get(0)is nowundefined; total size is rebuilt from estimates.This differs from the other adapters:
setOptions()during render,_willUpdate()after commit.setOptions(),_willUpdate(),triggerRef().setOptions(),_willUpdate(), explicit store publication.Solid should use lifecycle update plus explicit framework publication rather than
measure():This preserves measured sizes while still publishing count/total-size changes when core does not emit
onChange.Dynamic invalidation for options such as
gap, orientation, or estimate strategy should remain core-owned rather than relying on adapter-level full invalidation.