input-number icon indicating copy to clipboard operation
input-number copied to clipboard

onChange not fired for null|empty value

Open tboulis opened this issue 4 years ago • 0 comments

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!

tboulis avatar Mar 03 '21 13:03 tboulis