I have a UI-grid Custom Directive and I am changing the height of grid with a condition that if it has more than 10 rows I am fixing the height, this is the following code
scope.gridOptions.data = scope.data;
if (scope.data.length > 10) {
scope.gridOptions.minRowsToShow = 10;
} else {
scope.gridOptions.minRowsToShow = scope.data.length;
}
scope.gridOptions.virtualizationThreshold =scope.gridOptions.minRowsToShow;
by default its working fine but when I change the data the height is not updating. This is my plunker
minRowsToShow
norvirtualizationThreshold
in your plunker. The css is also missing. Please update your code to see whether it works as here – Wildebeestcss
as you said but when i have morethan 10 records even though its showing only 10 records, i want to fix the hieght if i have morethan 10 records – Saturnalia