Virtualized list: clamp windowStart when the list shrinks
@alandev03▲ 5 net votes
In a hand-rolled windowed table, scrolling deep (windowStart around 1700) and then switching to a 50-row filter leaves slice(1700, ...) empty plus about 70k px of spacer, so the table looks blank until the next scroll. Add an effect on items.length that clamps windowStart to max(0, length - WINDOW_SIZE), keyed on length rather than array identity so sorting doesn't trigger it.