Skip to content

Commit 18547eb

Browse files
Matthew Vukomanovicmportuga
Matthew Vukomanovic
authored andcommitted
fix(exporter): fix issue #6019 errors while opening grid menu with exporter service
change the exporter menu items which use "this.grid" to using simply "grid" fix #6019
1 parent a77a747 commit 18547eb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/features/exporter/js/exporter.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -687,31 +687,31 @@
687687
{
688688
title: i18nService.getSafeText('gridMenu.exporterAllAsExcel'),
689689
action: function ($event) {
690-
this.grid.api.exporter.excelExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL );
690+
grid.api.exporter.excelExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL );
691691
},
692692
shown: function() {
693-
return this.grid.options.exporterMenuExcel && this.grid.options.exporterMenuAllData;
693+
return grid.options.exporterMenuExcel && grid.options.exporterMenuAllData;
694694
},
695695
order: grid.options.exporterMenuItemOrder + 6
696696
},
697697
{
698698
title: i18nService.getSafeText('gridMenu.exporterVisibleAsExcel'),
699699
action: function ($event) {
700-
this.grid.api.exporter.excelExport( uiGridExporterConstants.VISIBLE, uiGridExporterConstants.VISIBLE );
700+
grid.api.exporter.excelExport( uiGridExporterConstants.VISIBLE, uiGridExporterConstants.VISIBLE );
701701
},
702702
shown: function() {
703-
return this.grid.options.exporterMenuExcel && this.grid.options.exporterMenuVisibleData;
703+
return grid.options.exporterMenuExcel && grid.options.exporterMenuVisibleData;
704704
},
705705
order: grid.options.exporterMenuItemOrder + 7
706706
},
707707
{
708708
title: i18nService.getSafeText('gridMenu.exporterSelectedAsExcel'),
709709
action: function ($event) {
710-
this.grid.api.exporter.excelExport( uiGridExporterConstants.SELECTED, uiGridExporterConstants.VISIBLE );
710+
grid.api.exporter.excelExport( uiGridExporterConstants.SELECTED, uiGridExporterConstants.VISIBLE );
711711
},
712712
shown: function() {
713-
return this.grid.options.exporterMenuExcel && this.grid.options.exporterMenuSelectedData &&
714-
( this.grid.api.selection && this.grid.api.selection.getSelectedRows().length > 0 );
713+
return grid.options.exporterMenuExcel && grid.options.exporterMenuSelectedData &&
714+
( grid.api.selection && grid.api.selection.getSelectedRows().length > 0 );
715715
},
716716
order: grid.options.exporterMenuItemOrder + 8
717717
}

0 commit comments

Comments
 (0)