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

Bug: NumberField calls onChange with NaN when the field gets emptied #881

Open
marcopiii opened this issue Aug 21, 2024 · 0 comments
Open
Labels
bug Something isn't working triage-needed

Comments

@marcopiii
Copy link
Member

Description of the bug

When a NumberField gets emptied, the component calls the onChange function passing NaN as argument.

I would expect it to pass null or undefined: it would be way easier to handle such cases since it would be visible in the callback signature.

Playroom reproduction

https://playroom.bento.buildo.io/preview/#?code=N4Igxg9gJgpiBcJgB0B2ACdAKLBKdAvAHzooabqSoDOALugNoBuAhgDYCuMANOtTLQBq7LgF1C6AEowWYWgDoO-AMq0WtGFgAsAJlxoK6AE4CORjFgOH0AHgByHALYAjGEYBiASxhsoV6+ioLI4wBMggwRAcqLTh-tZsLK5sYSAAgo5RMXHkAQAOiWAwABYQvm6pACoAnnkw6MVuMPItOQGYrJyhwJ1cAL7xhhCoAMLFLKgA5t1MhCTAlMPUZc1sEJNYTLgA3HwCwl2b+H0DudYA1p6oUKlgZiaoYNVt7XdGD0+pAKIAqpIvhgA9ER4vpyH1cHg0KcQH0gA

Version

v0.22.22

What browsers are you seeing the problem on?

Chrome

@marcopiii marcopiii added bug Something isn't working triage-needed labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage-needed
Projects
None yet
Development

No branches or pull requests

1 participant