Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit e1f0dde

Browse files
Ghislain BeaulacGhislain Beaulac
authored andcommitted
fix(exportService): when export is disabled, don't show in GridMenu
1 parent a7803a4 commit e1f0dde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/modules/angular-slickgrid/services/controlAndPlugin.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export class ControlAndPluginService {
273273
}
274274

275275
// show grid menu: export to file
276-
if (options && options.gridMenu && options.gridMenu.showExportCsvCommand && options.gridMenu.customItems && options.gridMenu.customItems.filter((item: CustomGridMenu) => item.command === 'export-csv').length === 0) {
276+
if (options && options.enableExport && options.gridMenu && options.gridMenu.showExportCsvCommand && options.gridMenu.customItems && options.gridMenu.customItems.filter((item: CustomGridMenu) => item.command === 'export-csv').length === 0) {
277277
options.gridMenu.customItems.push(
278278
{
279279
iconCssClass: 'fa fa-download',
@@ -285,7 +285,7 @@ export class ControlAndPluginService {
285285
);
286286
}
287287
// show grid menu: export to text file as tab delimited
288-
if (options && options.gridMenu && options.gridMenu.showExportTextDelimitedCommand && options.gridMenu.customItems && options.gridMenu.customItems.filter((item: CustomGridMenu) => item.command === 'export-text-delimited').length === 0) {
288+
if (options && options.enableExport && options.gridMenu && options.gridMenu.showExportTextDelimitedCommand && options.gridMenu.customItems && options.gridMenu.customItems.filter((item: CustomGridMenu) => item.command === 'export-text-delimited').length === 0) {
289289
options.gridMenu.customItems.push(
290290
{
291291
iconCssClass: 'fa fa-download',

0 commit comments

Comments
 (0)