angular-ui/ui-grid

removeFromGridMenu TypeError

Open

#4.471 geöffnet am 5. Okt. 2015

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (2.496 Forks)batch import
good first issue

Repository-Metriken

Stars
 (5.395 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

      /**
       * Init grid api
       */
      scope.gridOptions.onRegisterApi = function (gridApi) {
        scope.gridApi = gridApi;

        //Remove "Clear All Filters" from GridMenu
        scope.gridApi.core.removeFromGridMenu(gridApi.grid, 0);
       };

I want to remove Clear All Filters from gridMenu. When I try to call removeFromGridMenu I get:

TypeError: scope.gridApi.core.removeFromGridMenu is not a function

How I can call this function ? What would be correct way when I try to remove 'Clear all Filters'?

I also tried to remove Clear all Filters from menuItems array but this array is regenerated each time gridMenu is opened.

Contributor Guide