@mcurros2/microm 1.1.105-0 → 1.1.107-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
@@ -420,6 +420,7 @@ function $8b0c683387a5432f$export$f1f43a62560a15ec(props) {
420
420
  const addValidation = (0, $b4te3$react.useCallback)((column, validation)=>{
421
421
  var _a;
422
422
  if (validation) validationObject.current[column.name] = validation;
423
+ else delete validationObject.current[column.name];
423
424
  if (initialFormMode === "add" || forceDirty) initialDirty.current[column.name] = column.value !== "" || column.value !== null || column.value !== undefined ? true : false;
424
425
  initialValues.current[column.name] = (_a = column.value) !== null && _a !== void 0 ? _a : "";
425
426
  }, [
@@ -5213,10 +5214,11 @@ function $9023fcaf7ca2e4b7$export$94195a47b94ed396(props) {
5213
5214
  "requiredMessage",
5214
5215
  "description"
5215
5216
  ]);
5217
+ const effectiveRequired = !readOnly && !(entityForm.formMode === "view") && (required !== null && required !== void 0 ? required : !column.hasFlag((0, $4H7ea.EntityColumnFlags).nullable));
5216
5218
  (0, $hAMyt.useFieldConfiguration)({
5217
5219
  entityForm: entityForm,
5218
5220
  column: column,
5219
- required: required,
5221
+ required: effectiveRequired,
5220
5222
  requiredMessage: requiredMessage,
5221
5223
  readOnly: readOnly
5222
5224
  });
@@ -5224,8 +5226,7 @@ function $9023fcaf7ca2e4b7$export$94195a47b94ed396(props) {
5224
5226
  return (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Checkbox), Object.assign({}, others, {
5225
5227
  label: label !== null && label !== void 0 ? label : column.prompt,
5226
5228
  description: showDescription ? description !== null && description !== void 0 ? description : column.description : "",
5227
- disabled: disabled !== null && disabled !== void 0 ? disabled : entityForm.formMode === "view" || disableOnLoading && loading || readOnly,
5228
- required: !readOnly && !(entityForm.formMode === "view") && (required !== null && required !== void 0 ? required : !column.hasFlag((0, $4H7ea.EntityColumnFlags).nullable))
5229
+ disabled: disabled !== null && disabled !== void 0 ? disabled : entityForm.formMode === "view" || disableOnLoading && loading || readOnly
5229
5230
  }, entityForm.form.getInputProps(column.name, {
5230
5231
  type: "checkbox"
5231
5232
  })));