problem with p-spinner and decimal (5.2.4)
[X] bug report => Search github for a similar issue or PR before submitting
Current behavior
when I try to write 0.02 slowly in the spinner it automatically changes to 0 but if I write fast 0.02 it does it right
Expected behavior
writing slowly or quickly that respects the "0" in decimals
Minimal reproduction of the problem with instructions
https://www.primefaces.org/primeng/#/spinner section "step"
What is the motivation / use case for changing the behavior?
-
PrimeNG version: 5.2.4
-
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]
-
Node (for AoT issues):
node --version=
same problem
^ push, same problem with primeng 6.0.0
I provided a fix in https://github.com/primefaces/primeng/pull/5737 but unfortunately it broke something else (https://github.com/primefaces/primeng/issues/5847) in Spinner. Would be happy if anyone could take that pr and "fix the fix".
in 6.0.1 same problem :/
push
6.0.2 and 6.1.0 RC-1 same problem
@cagataycivici sry but your patch f723507 change only the theme and don't fix this bug.
Wrong one sorry.
How can I replicate on 6.1.0?
Please provide a case at;
https://stackblitz.com/github/primefaces/primeng-issue-template
online https://www.primefaces.org/primeng/#/spinner
demo https://stackblitz.com/edit/github-d2rcov?file=src/app/app.component.html
<p>tip 8.01</p>
<p>result: 81</p>
<p-spinner size="30" [(ngModel)]="content" [step]="0.01"></p-spinner>
Need to think about this, maybe it is better to move formatting to blur instead of keyup. Current workaround is [formatInput]="false"
[formatInput]="false" doesn't quite work
Being worked on.
Fixed via;
https://github.com/primefaces/primeng/issues/6496