@bluemarble/bm-components 0.0.86 → 0.0.87

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/esm/index.js CHANGED
@@ -14822,6 +14822,7 @@ const BaseInputMask = (_a) => {
14822
14822
  useEffect(() => {
14823
14823
  if (!value)
14824
14824
  setValue(String(defaultValue));
14825
+ ref.current.value = String(defaultValue);
14825
14826
  }, [defaultValue]);
14826
14827
  useEffect(() => {
14827
14828
  if (onChangeValue)
@@ -14831,14 +14832,17 @@ const BaseInputMask = (_a) => {
14831
14832
  };
14832
14833
  function FormikInputMask(_a) {
14833
14834
  var { mask, defaultValue, name } = _a, rest = __rest(_a, ["mask", "defaultValue", "name"]);
14834
- const { ref, value, unmaskedValue, setValue } = useIMask(mask);
14835
+ const { ref, value, unmaskedValue, maskRef, setValue } = useIMask(mask);
14835
14836
  const initialValue = useRef();
14836
14837
  const formikSaveFunction = useRef();
14837
14838
  useEffect(() => {
14838
- if (!value && defaultValue)
14839
+ if (!value && defaultValue) {
14839
14840
  setValue(String(defaultValue));
14841
+ maskRef.current.value = String(defaultValue);
14842
+ }
14840
14843
  else if (initialValue.current) {
14841
14844
  setValue(String(initialValue.current));
14845
+ maskRef.current.value = String(initialValue.current);
14842
14846
  }
14843
14847
  }, [defaultValue]);
14844
14848
  useEffect(() => {