You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57
Current behavior
InputNumber with min triggers onValueChange immediately if value is null or undefined.
Expected behavior
InputNumber should leave null/undefined value as is, shouldn't trigger onValueChange when the field wasn't touched by user at all. min shouldn't try to reimplement requiredness - that's a separate matter. It's reasonable to accept a validated number in a certain range or no number at all.
Minimal reproduction of the problem with instructions
Open the linked codesandbox. See 1 appear in the field without any input.
Please tell us about your environment:
React version:
PrimeReact version:
6.3.2
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Language: [all | TypeScript X.X | ES6/7 | ES5]
The text was updated successfully, but these errors were encountered:
Can be partially worked around with min={value !== null ? min : undefined} - at least then it won't change the value immediately. But you won't be able to delete the number once you started to input it.
I'm submitting a ... (check one with "x")
Codesandbox Case (Bug Reports)
https://codesandbox.io/s/inputnumber-onvaluechangemin-taints-the-value-0l8fs
Current behavior
InputNumber with min triggers onValueChange immediately if value is null or undefined.
Expected behavior
InputNumber should leave null/undefined value as is, shouldn't trigger onValueChange when the field wasn't touched by user at all. min shouldn't try to reimplement requiredness - that's a separate matter. It's reasonable to accept a validated number in a certain range or no number at all.
Minimal reproduction of the problem with instructions
Open the linked codesandbox. See 1 appear in the field without any input.
Please tell us about your environment:
PrimeReact version:
6.3.2
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
The text was updated successfully, but these errors were encountered: