primeng icon indicating copy to clipboard operation
primeng copied to clipboard

problem with p-spinner and decimal (5.2.4)

Open sourdoth opened this issue 8 years ago • 13 comments

[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 =

sourdoth avatar Apr 04 '18 21:04 sourdoth

same problem

cyberrranger avatar Apr 18 '18 08:04 cyberrranger

^ push, same problem with primeng 6.0.0

cyberrranger avatar Jun 27 '18 12:06 cyberrranger

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".

sbley avatar Jul 12 '18 11:07 sbley

in 6.0.1 same problem :/

cyberrranger avatar Jul 12 '18 13:07 cyberrranger

push

6.0.2 and 6.1.0 RC-1 same problem

cyberrranger avatar Aug 06 '18 13:08 cyberrranger

@cagataycivici sry but your patch f723507 change only the theme and don't fix this bug.

cyberrranger avatar Aug 10 '18 09:08 cyberrranger

Wrong one sorry.

cagataycivici avatar Aug 10 '18 12:08 cagataycivici

How can I replicate on 6.1.0?

Please provide a case at;

https://stackblitz.com/github/primefaces/primeng-issue-template

cagataycivici avatar Aug 14 '18 11:08 cagataycivici

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>

cyberrranger avatar Aug 14 '18 11:08 cyberrranger

Need to think about this, maybe it is better to move formatting to blur instead of keyup. Current workaround is [formatInput]="false"

cagataycivici avatar Aug 14 '18 13:08 cagataycivici

[formatInput]="false" doesn't quite work

CyleClone avatar Sep 13 '18 10:09 CyleClone

Being worked on.

cagataycivici avatar Sep 13 '18 13:09 cagataycivici

Fixed via;

https://github.com/primefaces/primeng/issues/6496

cagataycivici avatar Sep 13 '18 14:09 cagataycivici