javascript – How to get notified when there are grid changes – AngulasJs ui-grid

Question:

Is there any way to know if the grid has finished updating lines, or even if it has finished loading them?

I tried to do it this way:

$scope.gridApi.core.on.filterChanged($scope, function() {
    console.log('filter changed');
    $timeout(foo(),800);
});

But I'm not getting the callback to change the grid or finish loading.

Answer:

According to the documentation there is an event inside ui.grid.core.api called rowsRendered :

It is invoked after the cache of visible lines is changed.

The call goes like this:

$scope.gridApi.core.on.rowsRendered($scope, minhaFuncao);
Scroll to Top