@ostack.tech/ui-kform 0.13.1 → 0.14.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.
@@ -642,6 +642,7 @@
642
642
  .o-ui-kform-issues-panel__header {
643
643
  display: block;
644
644
  padding: 0 calc(var(--o-ui-space) * 4) calc(var(--o-ui-space) * 2) !important;
645
+ background-color: inherit;
645
646
  position: sticky;
646
647
  top: 0;
647
648
  }
@@ -1519,14 +1519,14 @@ function useFormLoader({
1519
1519
  if (message != null) {
1520
1520
  addToast(message, { severity: "success" });
1521
1521
  }
1522
- } catch (err) {
1523
- if (err instanceof DOMException && err.name === "AbortError") {
1522
+ } catch (error) {
1523
+ if (error instanceof DOMException && error.name === "AbortError") {
1524
1524
  return;
1525
1525
  }
1526
1526
  if (process.env.NODE_ENV !== "production") {
1527
- console.error(err);
1527
+ console.error(error);
1528
1528
  }
1529
- const message = typeof errorMessage2 === "function" ? errorMessage2(file, err) : errorMessage2;
1529
+ const message = typeof errorMessage2 === "function" ? errorMessage2(file, error) : errorMessage2;
1530
1530
  if (message != null) {
1531
1531
  addToast(message, { severity: "danger" });
1532
1532
  }
@@ -6370,11 +6370,19 @@ const RadioGroupControl = forwardRef(function RadioGroupControl2({
6370
6370
  preventAutoFocus,
6371
6371
  apiRef
6372
6372
  });
6373
+ const { onChange: inputOnChange } = inputProps;
6373
6374
  const handleValueChange = useCallback(
6374
- (formattedValue2) => setValue(
6375
- parseSelectionValueFromOptionIndex(formattedValue2, schema, options)
6376
- ),
6377
- [options, schema]
6375
+ (formattedValue2) => {
6376
+ inputOnChange(formattedValue2 ?? "");
6377
+ setValue(
6378
+ parseSelectionValueFromOptionIndex(
6379
+ formattedValue2 ?? "",
6380
+ schema,
6381
+ options
6382
+ )
6383
+ );
6384
+ },
6385
+ [inputOnChange, options, schema]
6378
6386
  );
6379
6387
  const clearedValue = nullable ? null : schema.initialValue;
6380
6388
  const clearedIdx = useMemo(
@@ -6408,10 +6416,7 @@ const RadioGroupControl = forwardRef(function RadioGroupControl2({
6408
6416
  readOnly: displayReadOnly || readOnly || inputProps.readOnly,
6409
6417
  status: displayStatusToControlStatus(displayStatusToDisplay),
6410
6418
  showClearButton: showClearButton === "auto" ? formattedValue !== clearedFormattedValue : showClearButton,
6411
- onValueChange: combineEventHandlers(
6412
- inputProps.onChange,
6413
- handleValueChange
6414
- ),
6419
+ onValueChange: handleValueChange,
6415
6420
  onFocus: combineEventHandlers(onFocus, handleFocus),
6416
6421
  onBlurToOutside: combineEventHandlers(
6417
6422
  onBlurToOutside,
@@ -6511,14 +6516,14 @@ function useFormSaver({
6511
6516
  addToast(message, { severity: "success" });
6512
6517
  }
6513
6518
  }
6514
- } catch (err) {
6515
- if (err instanceof DOMException && err.name === "AbortError") {
6519
+ } catch (error) {
6520
+ if (error instanceof DOMException && error.name === "AbortError") {
6516
6521
  return;
6517
6522
  }
6518
6523
  if (process.env.NODE_ENV !== "production") {
6519
- console.error(err);
6524
+ console.error(error);
6520
6525
  }
6521
- const message = typeof errorMessage2 == "function" ? errorMessage2(fileHandle, err) : errorMessage2;
6526
+ const message = typeof errorMessage2 == "function" ? errorMessage2(fileHandle, error) : errorMessage2;
6522
6527
  if (message != null) {
6523
6528
  addToast(message, { severity: "danger" });
6524
6529
  }