angular-ui/ui-grid

How to hide or extend clear all filters

Open

#6146 aperta il 3 apr 2017

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)JavaScript (2496 fork)batch import
help wantedtype: enhancement

Metriche repository

Star
 (5395 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor