angular-ui/ui-grid

Export options not visible on menu intermittently

Open

#5.788 geöffnet am 4. Nov. 2016

Auf GitHub ansehen
 (0 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

On my project I have 2 tables on a page and I was finding that randomly the export options would be missing from the menu of one or both the tables. I found the solution was to increase the delay:

` module.service('uiGridExporterService', ['$q', 'uiGridExporterConstants', 'gridUtil', '$compile', '$interval', 'i18nService', function ($q, uiGridExporterConstants, gridUtil, $compile, $interval, i18nService) {

  var service = {

    delay: 1000,

`

because when the code gets here: $interval( function() { if (grid.api.core.addToGridMenu){ service.addToMenu( grid ); } }, this.delay, 1); sometimes addToGridMenu is still undefined and the export options are not added to the menu

Contributor Guide