@oliasoft-open-source/react-ui-library 4.13.0-beta-7 → 4.13.0-beta-8

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
@@ -70298,6 +70298,7 @@ const PredefinedOptionsMenu = ({
70298
70298
  unitkey: optionUnitKey
70299
70299
  }) => {
70300
70300
  if (!value || !rootUnitKey) return value;
70301
+ if (!isValueWithUnit(value)) return value;
70301
70302
  const selectedUnitKey = optionUnitKey || rootUnitKey;
70302
70303
  const preferredOptionUnit = getPreferredUnit(selectedUnitKey, unitTemplate);
70303
70304
  const { value: resultValue } = safeConvertValue({
@@ -70571,27 +70572,18 @@ const UnitInput = ({
70571
70572
  predefinedOptions,
70572
70573
  displayLayer,
70573
70574
  onPredefinedOptionSelect: (newValue, option2) => {
70574
- if (option2 == null ? void 0 : option2.linked) {
70575
- onChange({
70576
- target: {
70577
- value,
70578
- name: stringName,
70579
- predefinedSelected: true,
70580
- predefinedOption: option2
70581
- }
70582
- });
70583
- } else {
70584
- onChange({
70585
- target: {
70586
- value: newValue,
70587
- name: stringName
70588
- }
70589
- });
70590
- setDisplayLayer({
70575
+ onChange({
70576
+ target: {
70591
70577
  value: newValue,
70592
- unit: getUnit(newValue) || displayLayer.unit
70593
- });
70594
- }
70578
+ name: stringName,
70579
+ predefinedSelected: true,
70580
+ predefinedOption: option2
70581
+ }
70582
+ });
70583
+ setDisplayLayer({
70584
+ value: newValue,
70585
+ unit: getUnit(newValue) || displayLayer.unit
70586
+ });
70595
70587
  },
70596
70588
  disabled: disabled2,
70597
70589
  initialPredefinedOption,