react-component / react-component/input-number
onChange not fired for null|empty value
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 323
- Forks
- 188
- Avg merge
- 20h 3m
- Merged PRs (30d)
- 1
Description
I've noticed that after updating to v7.0.0 (from 6.2.0) the onChange event is not triggered when the input is cleared (null) while maintaining focus. After losing focus (onBlur) the value is automatically changed to 0 and then the onChange is triggered with value 0.
I saw a PR regarding this (https://github.com/react-component/input-number/pull/296) but I couldn't understand much. So I don't know if this is a feature or a bug.
If it is a feature is it possible to add a property like allowEmpty or should we use the onInput handler to capture the null value?
Thanks in advance!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the cleared-input behavior described for v7.0.0 and compare it with 6.2.0, then read pull request #296 for the related change. Done means the expected onChange behavior for a focused input cleared to null is settled and verified against the reported blur-to-zero sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100