@mcurros2/microm 1.1.437-0 → 1.1.438-0

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.
package/dist/index.js CHANGED
@@ -184,7 +184,8 @@ const $ed5512685e858344$export$659b17aab7c47d60 = {
184
184
  navigationProtection: 'confirm'
185
185
  };
186
186
  function $ed5512685e858344$export$f1f43a62560a15ec(props) {
187
- const { entity: entity, initialFormMode: initialFormMode, validateInputOnBlur: validateInputOnBlur, validateInputOnChange: validateInputOnChange, onSaved: onSaved, onCancel: onCancel, getDataOnInit: getDataOnInit, forceDirty: forceDirty, initialShowDescriptionInFields: initialShowDescriptionInFields, saveAndGetOverride: saveAndGetOverride, noSaveOnSubmit: noSaveOnSubmit, bindedColumnNames: bindedColumnNames, saveAndGetOnSubmit: saveAndGetOnSubmit, cancelGetOnUnmount: cancelGetOnUnmount, cancelSaveOnUnmount: cancelSaveOnUnmount, navigationProtection: navigationProtection, validateForm: validateForm } = (0, $b4te3$mantinecore.useComponentDefaultProps)('', $ed5512685e858344$export$659b17aab7c47d60, props);
187
+ const { entity: entity, initialFormMode: initialFormMode, validateInputOnBlur: validateInputOnBlur, validateInputOnChange: validateInputOnChange, onSaved: onSaved, onCancel: onCancel, getDataOnInit: getDataOnInit, forceDirty: forceDirty, initialShowDescriptionInFields: initialShowDescriptionInFields, saveAndGetOverride: saveAndGetOverride, noSaveOnSubmit: noSaveOnSubmit, bindedColumnNames: bindedColumnNames, saveAndGetOnSubmit: saveAndGetOnSubmit, cancelGetOnUnmount: cancelGetOnUnmount, cancelSaveOnUnmount: cancelSaveOnUnmount, navigationProtection: navigationProtection, validateForm: validateForm, showCancel: showCancel, showOK: showOK, buttons: buttons } = (0, $b4te3$mantinecore.useComponentDefaultProps)('', $ed5512685e858344$export$659b17aab7c47d60, props);
188
+ const effectiveNavigationProtection = navigationProtection === 'confirm' && showCancel === false && showOK === false && !buttons ? 'disabled' : navigationProtection;
188
189
  const { confirmWarning: confirmWarning, showValidationError: showValidationError } = (0, $n9rI9.useValidateFormModals)();
189
190
  const modal = (0, $k7qj2.useModal)();
190
191
  const [status, setStatus] = (0, $b4te3$react.useState)({}); // Initial queryStatus is empty on purpose to not disable fields before data is loaded
@@ -621,7 +622,7 @@ function $ed5512685e858344$export$f1f43a62560a15ec(props) {
621
622
  navigationProtection
622
623
  ]);
623
624
  (0, $1Mm5D.useConfirmNavigation)({
624
- mode: navigationProtection,
625
+ mode: effectiveNavigationProtection,
625
626
  hasUnsavedChanges: hasUnsavedChanges,
626
627
  onSave: async (navigationType)=>await handleSubmit(undefined, true, undefined, navigationType === 'remote' ? {
627
628
  keepalive: true