venice-ui 2.3.5 → 2.3.6

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.
@@ -72,7 +72,11 @@ const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disab
72
72
  };
73
73
  const onKeyDown = async (e) => {
74
74
  if (handleSubmit && e.key === 'Enter') {
75
- await debouncedRef.current.flush();
75
+ debouncedRef.current.cancel();
76
+ const currentValue = type === 'number' || type === 'increase'
77
+ ? calculateNumberValue(e.currentTarget.value)
78
+ : e.currentTarget.value.toString();
79
+ handleChange(name, currentValue);
76
80
  handleSubmit();
77
81
  }
78
82
  };
@@ -46,7 +46,11 @@ export const Input = ({ label, labelPosition = 'top', value, type = 'text', name
46
46
  };
47
47
  const onKeyDown = async (e) => {
48
48
  if (handleSubmit && e.key === 'Enter') {
49
- await debouncedRef.current.flush();
49
+ debouncedRef.current.cancel();
50
+ const currentValue = type === 'number' || type === 'increase'
51
+ ? calculateNumberValue(e.currentTarget.value)
52
+ : e.currentTarget.value.toString();
53
+ handleChange(name, currentValue);
50
54
  handleSubmit();
51
55
  }
52
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "2.3.5",
3
+ "version": "2.3.6",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",