indicator-ui 0.0.81 → 0.0.83

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
@@ -6274,6 +6274,7 @@ __webpack_require__.r(__webpack_exports__);
6274
6274
 
6275
6275
  function useFormData(value) {
6276
6276
  const [formData, setFormData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(value || {});
6277
+ const formDataRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value || {});
6277
6278
  const setValue = (value, keyWay, options = { unionToArray: false }) => {
6278
6279
  setFormData(prevState => {
6279
6280
  let newValue = value;
@@ -6300,17 +6301,21 @@ function useFormData(value) {
6300
6301
  }
6301
6302
  }
6302
6303
  }
6303
- return { ...(0,_lib__WEBPACK_IMPORTED_MODULE_1__.setDeepValue)(prevState, newValue, { keysWay: keyWay }) };
6304
+ const newState = { ...(0,_lib__WEBPACK_IMPORTED_MODULE_1__.setDeepValue)(prevState, newValue, { keysWay: keyWay }) };
6305
+ formDataRef.current = newState;
6306
+ return newState;
6304
6307
  });
6305
6308
  };
6306
6309
  const getValue = (keyWay) => {
6307
- return (0,_lib__WEBPACK_IMPORTED_MODULE_1__.getDeepValue)(formData, keyWay);
6310
+ return (0,_lib__WEBPACK_IMPORTED_MODULE_1__.getDeepValue)(formDataRef.current, keyWay);
6308
6311
  };
6309
6312
  const resetForm = () => {
6310
6313
  setFormData(value || {});
6314
+ formDataRef.current = value || {};
6311
6315
  };
6312
6316
  const clearForm = () => {
6313
6317
  setFormData({});
6318
+ formDataRef.current = {};
6314
6319
  };
6315
6320
  const deleteArrayItem = (keyWay) => {
6316
6321
  const lastKeyWay = keyWay.length > 0 && keyWay[keyWay.length - 1] || undefined;
@@ -9623,7 +9628,9 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
9623
9628
  }
9624
9629
  if (autoClose) {
9625
9630
  setIsShowModalWindow(false);
9626
- onBlur && onBlur();
9631
+ if (searching == null) {
9632
+ onBlur && onBlur();
9633
+ }
9627
9634
  }
9628
9635
  };
9629
9636
  const getViewField = () => {