Are highlighted rows (<divs> in the DOM) in the Angular UI Grid equal to the number of elements (gridOptions.data.length)?

I am using Angular UI Grid and my situation is as follows. I have 100 elements, items = [{}, {}, ..., {}], and I want to display all these elements in the grid, but I want 100 for each element in the DOM at the same time. Is it possible?

As I understand it, ui.grid simply adds to the DOM the required number of divs based on the height of the viewport and the height of each row. I mean, ui.grid just supports in the DOM several necessary divs to fill the grid area.

I need one div for each element and no changes to the DOM while I scroll.

Thanks in advance!

+6
source share
1 answer

I found that the gridFreeRows option is used for this grid, setting equal or more elements that I want to display. This works for me.

$scope.gridOptions.excessRows = 100; 

@Documentation: Extra lines for rendering outside the viewport, which helps with smooth scrolling.

Thanks!

+5
source

Source: https://habr.com/ru/post/981608/


All Articles