@topconsultnpm/sdkui-react-beta 6.16.6 → 6.16.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,6 +65,11 @@ const TMApplyForm = ({ children, width, height, showToolbar = true, formMode, is
65
65
  onClose?.();
66
66
  return;
67
67
  }
68
+ // Se ci sono errori, chiudi direttamente senza chiedere di applicare
69
+ if (errorsCount > 0) {
70
+ onClose?.();
71
+ return;
72
+ }
68
73
  TMMessageBoxManager.show({
69
74
  message: "Applicare le modifiche apportate?", buttons: [ButtonNames.YES, ButtonNames.NO, ButtonNames.CANCEL], //TODO SDKUI_Localizator.ApplyQuestion
70
75
  onButtonClick: async (e) => {
@@ -72,8 +77,6 @@ const TMApplyForm = ({ children, width, height, showToolbar = true, formMode, is
72
77
  if (e == ButtonNames.CANCEL)
73
78
  return;
74
79
  if (e == ButtonNames.YES) {
75
- if (errorsCount > 0)
76
- return;
77
80
  onApply?.();
78
81
  }
79
82
  onClose?.();
@@ -86,8 +86,8 @@ const TMChooserForm = ({ children, title, allowMultipleSelection = false, allowA
86
86
  ...summaryItems ?? {}
87
87
  });
88
88
  }, [manageUseLocalizedName, summaryItems]);
89
- return (_jsx(TMModal, { title: renderTitle(), width: width ?? '550px', height: height ?? '600px', toolbar: _jsx(ToolbarButtons, {}), onClose: onClose, children: children ??
90
- filteredItems.length > 0
89
+ return (_jsx(TMModal, { title: renderTitle(), width: width ?? '550px', height: height ?? '600px', toolbar: _jsx(ToolbarButtons, {}), onClose: onClose, children: (children ??
90
+ filteredItems.length > 0)
91
91
  ? _jsx(TMDataGrid, { dataSource: filteredItems, keyExpr: keyName, dataColumns: dataColumns, focusedRowKey: focusedRowKey, selectedRowKeys: selectedRowKeys, searchPanelFocusStarting: true, headerFilter: { visible: true }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single', showCheckBoxesMode: 'always', selectAllMode: 'allPages' }, grouping: allowGrouping ? { autoExpandAll: false, expandMode: 'rowClick' } : undefined, summary: customSummary, onFocusedRowChanged: handleFocusedRowChange, onSelectionChanged: handleSelectionChanged, onRowDblClick: handleRowDoubleClick })
92
92
  : _jsx(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: _jsx(TMLayoutItem, { children: _jsx("p", { style: { height: "100%", color: TMColors.primaryColor, fontSize: "1.5rem", display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: SDKUI_Localizator.NoDataToDisplay }) }) }) }));
93
93
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.16.6",
3
+ "version": "6.16.7",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",