Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nz-input-number doesn't react on input, but only on change (that happens on blur) #8985

Open
HaidarVladyslav opened this issue Jan 20, 2025 · 0 comments

Comments

@HaidarVladyslav
Copy link

HaidarVladyslav commented Jan 20, 2025

Reproduction link

https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/input-number/input-number.component.ts

Steps to reproduce

new component - https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/input-number/input-number.component.ts
legacy component - https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/input-number-legacy/input-number.component.ts
Why does it have (change) event instead of (ngModelChange) as it was before?
https://stackblitz.com/edit/qep7bq9r?file=src%2Fapp%2Fapp.component.ts

What is expected?

Why does it have (change) event instead of (ngModelChange) as it was before? Is it possible to fire onChange() event not when user triggers blur event?

What is actually happening?

It doesn't fire onChange event from ControlValueAccessor on input or onModelChange. Also, is it possible to remove value from field at all? - when I remove the value, it turns to nil (0).

Environment Info
ng-zorro-antd 19.0.2
Browser Chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants