From 1156f28879f7812faf8ad75f1b1a2b40e367c1a8 Mon Sep 17 00:00:00 2001 From: gnbm Date: Wed, 21 Aug 2024 16:22:26 +0100 Subject: [PATCH] Update ContextMenu.ts --- src/Providers/DataGrid/Wijmo/Features/ContextMenu.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Providers/DataGrid/Wijmo/Features/ContextMenu.ts b/src/Providers/DataGrid/Wijmo/Features/ContextMenu.ts index 0d2c5c91..37dd84ef 100644 --- a/src/Providers/DataGrid/Wijmo/Features/ContextMenu.ts +++ b/src/Providers/DataGrid/Wijmo/Features/ContextMenu.ts @@ -339,7 +339,12 @@ namespace Providers.DataGrid.Wijmo.Feature { const menuItem = this._menuItems.get(menuItemId); if (menuItem) { if (menuItem.hasOwnProperty(propertyName)) { - menuItem[propertyName] = propertyValue; + if (propertyName === 'label' && this.grid.config.sanitizeInputValues) { + // Sanitize the label if the configuration is set to do so + menuItem.label = OSFramework.DataGrid.Helper.Sanitize(propertyValue as string); + } else { + menuItem[propertyName] = propertyValue; + } } else { console.error(`MenuItem "${menuItem.label}" has no property "${propertyName}" defined.`); }