mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
🆙 Upgrade rc-input-number@4.4.0 to fix 13896
This commit is contained in:
parent
8389b94cf5
commit
7bbeaff3ed
@ -1,4 +1,18 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import InputNumber from '..';
|
||||
import focusTest from '../../../tests/shared/focusTest';
|
||||
|
||||
describe('InputNumber', () => {
|
||||
focusTest(InputNumber);
|
||||
|
||||
// https://github.com/ant-design/ant-design/issues/13896
|
||||
it('should return null when blur a empty input number', () => {
|
||||
const onChange = jest.fn();
|
||||
const wrapper = mount(<InputNumber defaultValue="1" onChange={onChange} />);
|
||||
wrapper.find('input').simulate('change', { target: { value: '' } });
|
||||
expect(onChange).toHaveBeenLastCalledWith('');
|
||||
wrapper.find('input').simulate('blur');
|
||||
expect(onChange).toHaveBeenLastCalledWith(null);
|
||||
});
|
||||
});
|
||||
|
@ -65,7 +65,7 @@
|
||||
"rc-dropdown": "~2.4.1",
|
||||
"rc-editor-mention": "^1.1.7",
|
||||
"rc-form": "^2.4.0",
|
||||
"rc-input-number": "~4.3.7",
|
||||
"rc-input-number": "~4.4.0",
|
||||
"rc-menu": "~7.4.12",
|
||||
"rc-notification": "~3.3.0",
|
||||
"rc-pagination": "~1.17.7",
|
||||
|
Loading…
Reference in New Issue
Block a user