angular-ui/ui-grid

How to hide or extend clear all filters

Open

#6,146 opened on Apr 3, 2017

View on GitHub
 (2 comments) (0 reactions) (0 assignees)JavaScript (5,395 stars) (2,496 forks)batch import
help wantedtype: enhancement

Description

Hello,

Is it possible to hide clear all filters from grid menu? I want to have options enableFiltering: true, but I don't want to have "Clear All Filters" in Grid Menu.

Why I want to hide that is because I made my custom menu item "Remove all filters" which removes ( clear ) searches, grouping & selected rows.

        gridMenuCustomItems: [
          {
            title: "Reset all filters",
            action: function($event){
              console.log($scope);
              $scope.gridApi.grouping.clearGrouping(); // clear grouping
              $scope.gridApi.selection.clearSelectedRows(); // clear selected rows
              $scope.gridApi.core.clearAllFilters(); // clear search
              // $scope.gridApi.pinning.pinColumn("");  // clear pinned columns
            },
          }
        ],

If it is not possible to hide "Clear all filters" is it possible to extend that functionallity and add options for removing grouping and selected rows.

Thanks in advance

Contributor guide

How to hide or extend clear all filters · angular-ui/ui-grid#6146 | Good First Issue