It is suicidal act to display a large amount of DOM on the Web. The movement of the Web browser gets frozen or it freezes. Therefore pagination is used, but there are many cases that you are required to display all data as business requirements.
Let's use scrollMonitor in such a case. Smooth scrolling becomes possible even with a large amount of data.
How to use scrollMonitor
It is a usage example. Only the part that is actually displayed is this visible part, the yellow and purple parts disappear, or it is newly displayed in the DOM additionally.
You can also scroll with headings left.
In scrollMonitor, data is in memory, but it draws it according to scroll. In addition, the part which became unnecessary is discarded. This realizes stable scrolling even with a large amount of data. It is also possible to use scrollMonitor as it is, but there seems to be points learned from here.
scrollMonitor is JavaScript open source software (MIT License).
No comments:
Post a Comment