p-spinner with mininum set, on lose focus not setting null if empty value
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior When min is set and p-spinner loses focus, value is set to min if the field is empty.
Expected behavior When p-spinner loses focus, value should be set to null if no value is entered.
Minimal reproduction of the problem with instructions Set p-spinner [min] value to 50, clear text from p-spinner and press tab. Value is set to 50.
Please tell us about your environment: Windows
-
Angular version: 5.X Angular 7.0.1
-
PrimeNG version: 5.X 7.0.0-beta.1
-
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 ] Chrome
-
Language: [all | TypeScript X.X | ES6/7 | ES5] Typescript 3.1.3
same here
This seems to be a duplicate of this issue : https://github.com/primefaces/primeng/issues/3318
It is supposed to be fixed, since the PR https://github.com/primefaces/primeng/issues/3318 has been merged.
I have compared source code with the fix given in https://github.com/primefaces/primeng/issues/3318, the bug is still present in the last version 7.0.5 (at the time I am writing this message) and also in master
@Pikadili83 @CyleClone if you can't wait for the fix, you still can wrap primeng spinner in a custom component that fixes the bug. You can have a look to my gist : https://gist.github.com/mouss-delta/c8cbec4e0464d2a4db33ab1ad1ef99c4