You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with a table design I found it important to limit the number of rows that were displayed at once due to browser slowdown/lag at large quantities. My first approach was to .map() the array of rows and simply return null after reaching my limit (10 for the sake of the demo)
I was able to change from .map() to .reduce() with great success. Included in the jsfiddle are both approaches - GenerateElements uses .map(), GenerateElementsReduce uses .reduce().
When working with a table design I found it important to limit the number of rows that were displayed at once due to browser slowdown/lag at large quantities. My first approach was to .map() the array of rows and simply return null after reaching my limit (10 for the sake of the demo)
However, when domvm receives the result of this, it chokes for multiple seconds attempting to process them. Using devtools to profile it, it seems to stem from using Array.splice() to filter out the null elements.
I was able to change from .map() to .reduce() with great success. Included in the jsfiddle are both approaches - GenerateElements uses .map(), GenerateElementsReduce uses .reduce().
Minimal example demonstrating the issue: https://jsfiddle.net/dpbrxf5u/
The text was updated successfully, but these errors were encountered: