Search code examples
javascriptangularjsangular-ui-grid

UI grid trigger a function when filter is applied


Angular UI grid.

My requirement is to trigger a function when ever some one applied a filter on the grid.

Any help is appreciated


Solution

  • You can listen to the filterChanged event when you register the gridApi.

    gridOptions.onRegisterApi = function(gridApi){
        $scope.gridApi.core.on.filterChanged($scope, function(){
             // your logic goes here
        }
    }