Skip to content

Commit

Permalink
fix: InputNumber support null (#30337)
Browse files Browse the repository at this point in the history
* fix: InputNumber support null

* test: update test case
  • Loading branch information
zombieJ committed Apr 28, 2021
1 parent 579e3c5 commit dbbf0da
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions components/input-number/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ describe('InputNumber', () => {
const onChange = jest.fn();
const wrapper = mount(<InputNumber defaultValue="1" onChange={onChange} />);
wrapper.find('input').simulate('change', { target: { value: '' } });
expect(onChange).not.toHaveBeenCalled();

wrapper.find('input').simulate('blur');
expect(onChange).toHaveBeenLastCalledWith(null);
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"rc-dropdown": "~3.2.0",
"rc-field-form": "~1.20.0",
"rc-image": "~5.2.4",
"rc-input-number": "~7.0.1",
"rc-input-number": "~7.1.0",
"rc-mentions": "~1.5.0",
"rc-menu": "~8.10.0",
"rc-motion": "^2.4.0",
Expand Down

0 comments on commit dbbf0da

Please sign in to comment.