Skip to content

Commit 29a3a32

Browse files
authored
docs: Fix if statement in experimental row virtualization example (#6050)
1 parent 0cc6992 commit 29a3a32

File tree

1 file changed

+1
-1
lines changed
  • examples/react/virtualized-rows-experimental/src

1 file changed

+1
-1
lines changed

examples/react/virtualized-rows-experimental/src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ function TableBodyRow({
263263
<tr
264264
data-index={virtualRowIndex} // needed for dynamic row height measurement
265265
ref={node => {
266-
if (node && virtualRowIndex) {
266+
if (node && typeof virtualRowIndex !== 'undefined') {
267267
rowVirtualizer.measureElement(node) // measure dynamic row height
268268
rowRefsMap.current.set(virtualRowIndex, node) // store ref for virtualizer to apply scrolling transforms
269269
}

0 commit comments

Comments
 (0)