Creating a placeholder
Is there a way to make a placeholder?
const rowVirtualizer = useVirtualizer({
count: rows.length,
getScrollElement: () => rowsRef.current,
estimateSize: (index) => getScaledRowHeight(rows[index].type, fontSize),
getItemKey: (index) => {
return `${rows[index].type}-${rows[index].targetId ?? index}`;
},
overscan: 50,
});
const items = rowVirtualizer.getVirtualItems(); const rowVirtualizer = useVirtualizer({
count: rows.length,
getScrollElement: () => rowsRef.current,
estimateSize: (index) => getScaledRowHeight(rows[index].type, fontSize),
getItemKey: (index) => {
return `${rows[index].type}-${rows[index].targetId ?? index}`;
},
overscan: 50,
});
const items = rowVirtualizer.getVirtualItems();