Dominic
1 min readDec 21, 2024

--

You missed the greatest secret sauce of all DOM based web datagrids. Not all grids know the secret sauce and it’s very easy to tell in a demo. It’s literally impossible to prevent blank flashes when scrolling fast if you try to render on to a scrollable area at the speed of scrolling because the scroll events are throttled. You instead have to coordinate another div to move when you receive scroll events. Since if you move fast you won’t receive an event for every area of the grid and so it’s not even possible in vanilla JS to render rows in all frames while scrolling fast. It’s kinda hard to explain but AG grid and some others do this secret - so even while it’s slow and clunky itself it doesn’t suffer from the ugly blank flashes.

I haven’t looked at your source yet, but things get considerably more complex when you virtualise columns too and also have pinned columns and rows, master-details views in the grid, column groups, column/row reordering and resizing etc on top of virtualisation.

--

--

Dominic
Dominic

Written by Dominic

Tech fatigue? Nope. I love reading about new frameworks and languages and dabbling

No responses yet