ar-design 0.3.66 → 0.3.67

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.
@@ -4,7 +4,7 @@ import Input from "../input";
4
4
  import { NUMBER } from "../../../libs/infrastructure/shared";
5
5
  const InputNumber = ({ variant, color, name, value, onChange, locale = "tr-TR", digits, placeholder, validation, disabled, }) => {
6
6
  // refs
7
- const _firstLoad = useRef(false);
7
+ // const _firstLoad = useRef<boolean>(false);
8
8
  const _input = useRef(null);
9
9
  // states
10
10
  const [_value, setValue] = useState("");
@@ -66,11 +66,12 @@ const InputNumber = ({ variant, color, name, value, onChange, locale = "tr-TR",
66
66
  };
67
67
  // useEffects
68
68
  useEffect(() => {
69
- if (!_firstLoad.current && value !== undefined && value !== "") {
70
- // const isDecimals = String(value).includes(".");
71
- setValue(getFormatter.format(Number(value)));
72
- _firstLoad.current = true;
73
- }
69
+ // if (!_firstLoad.current && value !== undefined && value !== "") {
70
+ // // const isDecimals = String(value).includes(".");
71
+ // setValue(getFormatter.format(Number(value)));
72
+ // _firstLoad.current = true;
73
+ // }
74
+ setValue(getFormatter.format(Number(value)));
74
75
  }, [value]);
75
76
  return (React.createElement(Input, { ref: _input, name: name, variant: variant, color: color, value: _value ?? "", type: "text", inputMode: "decimal", onChange: (event) => {
76
77
  // Disabled gelmesi durumunda işlem yapmasına izin verme...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.3.66",
3
+ "version": "0.3.67",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",