aefis-core-ui 2.2.4 → 2.2.5

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.
@@ -2304,10 +2304,11 @@ const Chip = ({
2304
2304
  })
2305
2305
  })
2306
2306
  };
2307
- const {
2308
- disabled
2309
- } = useFormControl();
2310
- const _canDelete = canDelete && !disabled;
2307
+
2308
+ // TODO: create FormChip (or similar) and use contextful version there. Pure
2309
+ // and Contextful component should be seperated
2310
+ const formControl = useFormControl();
2311
+ const _canDelete = canDelete && !(formControl != null && formControl.disabled);
2311
2312
  const Chip = () => {
2312
2313
  return /*#__PURE__*/jsx(Chip$1, _extends({
2313
2314
  role: role || "presentation",
@@ -2315,7 +2316,7 @@ const Chip = ({
2315
2316
  }, chipProps, _canDelete && {
2316
2317
  onDelete
2317
2318
  }, {
2318
- disabled: disabled
2319
+ disabled: formControl == null ? void 0 : formControl.disabled
2319
2320
  }));
2320
2321
  };
2321
2322