@tanstack/virtual-core 3.19.15 → 3.19.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/virtual-core",
3
- "version": "3.19.15",
3
+ "version": "3.19.16",
4
4
  "description": "Headless UI for virtualizing scrollable elements in TS/JS + Frameworks",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -1155,12 +1155,19 @@ export class Virtualizer<
1155
1155
  this.observer.observe(cached)
1156
1156
  })
1157
1157
 
1158
+ let observing = false
1158
1159
  this.unsubs.push(
1159
1160
  this.options.observeElementRect(this, (rect) => {
1160
1161
  this.scrollRect = rect
1161
1162
  this.maybeNotify()
1163
+ // A render inside a delivery can detach rows without a ref-null
1164
+ // callback (Solid never makes one). Drop them as the row observer
1165
+ // does. The first call is the initial read, not a delivery, and
1166
+ // rows that are not attached yet stay observed through it.
1167
+ if (observing) this.measureElement(null)
1162
1168
  }),
1163
1169
  )
1170
+ observing = true
1164
1171
 
1165
1172
  this.unsubs.push(
1166
1173
  this.options.observeElementOffset(this, (offset, isScrolling) => {