indicator-ui 0.0.113 → 0.0.115

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
@@ -9037,7 +9037,7 @@ function DateField({ value, disabled, required, isError, onChange, onFocus, date
9037
9037
  const handleChange = (newDate) => {
9038
9038
  setDateValue(newDate);
9039
9039
  const formatDate = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(newDate, { from: dateFormat, to: dateFormat, errorNull: true });
9040
- if (formatDate !== null && onChange) {
9040
+ if (newDate.length === dateFormat.length && formatDate !== null && onChange) {
9041
9041
  onChange(formatDate);
9042
9042
  }
9043
9043
  };
@@ -9212,7 +9212,7 @@ function TimeField({ value, disabled, required, isError, onChange, onFocus, time
9212
9212
  const handleChange = (newTime) => {
9213
9213
  setTimeValue(newTime);
9214
9214
  const formatTime = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(newTime, { from: timeFormat, to: timeFormat, errorNull: true });
9215
- if (formatTime !== null && onChange) {
9215
+ if (newTime.length === timeFormat.length && formatTime !== null && onChange) {
9216
9216
  onChange(formatTime);
9217
9217
  }
9218
9218
  };
@@ -9237,6 +9237,7 @@ function TimeField({ value, disabled, required, isError, onChange, onFocus, time
9237
9237
  from: 0,
9238
9238
  to: 999, // для миллисекунд 000-999
9239
9239
  },
9240
+ autofix: false,
9240
9241
  }, required: required });
9241
9242
  }
9242
9243
 
@@ -10107,7 +10108,7 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
10107
10108
  };
10108
10109
  }, []);
10109
10110
  const fillOptionsCache = (data) => {
10110
- optionsCacheRef.current = data.length > 0 ? optionsState.filter(item => data.includes(item.value)) : optionsState;
10111
+ optionsCacheRef.current = data && data.length > 0 ? optionsState.filter(item => data.includes(item.value)) : optionsState;
10111
10112
  };
10112
10113
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
10113
10114
  fillOptionsCache(value);
@@ -10499,7 +10500,7 @@ function TextareaField({ value, name, placeholder, onChange, required = false, d
10499
10500
  e.preventDefault();
10500
10501
  onChange && onChange(e.target.value);
10501
10502
  };
10502
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { name: name, placeholder: placeholder, value: value, onChange: handleOnChange, required: required, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.textareaField, {
10503
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea", { name: name, placeholder: placeholder, value: value ?? undefined, onChange: handleOnChange, required: required, disabled: disabled, className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.textareaField, {
10503
10504
  [_styles__WEBPACK_IMPORTED_MODULE_2__.TextareaFieldStyle.isError]: isError,
10504
10505
  }, additionStyles) }));
10505
10506
  }