Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to disable Angular Grid virtualization, i.e. Angular creating div's for grid based on height/width position?

I have a Angular grid (ag-grid) that will, based on scrolling/view, create div in the DOM to display data. I am writing a Selenium WebDriver test that would read the data from the grid and compare it to the data returned from the API.

Since some of the div's are not yet created (hidden behind Angular virtualization) WebDriver is not able to effectively capture the data.

Is there a way to force the grid to display all data?

like image 563
user3063502 Avatar asked Sep 02 '25 17:09

user3063502


1 Answers

there is a setting, gridOptions.rowBuffer, that tells the grid how many extra rows to render above / below the viewport. set this to a number greater than the number of rows you have and then all rows will be rendered. or if unsure, set it to 9999999.

ps you mention 'Angular Grid' and 'Angular Virtualisation'. to be correct, it is called 'Agnostic Grid' - the ag stands for AGnostic - and also the virtualisation is not Angular, grid grid has it's own implementation of row virtualisation.

like image 109
Niall Crosby Avatar answered Sep 04 '25 06:09

Niall Crosby