mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
✅ fix warning in test case
This commit is contained in:
parent
a74d04118b
commit
b2c7c53b4c
@ -49,6 +49,7 @@ export default class Drawer extends React.Component<DrawerProps, IDrawerState> {
|
||||
PropTypes.string,
|
||||
PropTypes.object as PropTypes.Requireable<HTMLElement>,
|
||||
PropTypes.func,
|
||||
PropTypes.bool,
|
||||
]),
|
||||
maskClosable: PropTypes.bool,
|
||||
mask: PropTypes.bool,
|
||||
|
@ -11,7 +11,7 @@ import { FIELD_META_PROP, FIELD_DATA_PROP } from './constants';
|
||||
import Icon from '../icon';
|
||||
import { tuple } from '../_util/type';
|
||||
|
||||
const ValidateStatuses = tuple('success', 'warning', 'error', 'validating');
|
||||
const ValidateStatuses = tuple('success', 'warning', 'error', 'validating', '');
|
||||
|
||||
export interface FormItemProps {
|
||||
prefixCls?: string;
|
||||
|
@ -3,14 +3,14 @@
|
||||
exports[`Input should support maxLength 1`] = `
|
||||
<Input
|
||||
disabled={false}
|
||||
maxLength="3"
|
||||
maxLength={3}
|
||||
prefixCls="ant-input"
|
||||
type="text"
|
||||
>
|
||||
<input
|
||||
className="ant-input"
|
||||
disabled={false}
|
||||
maxLength="3"
|
||||
maxLength={3}
|
||||
onKeyDown={[Function]}
|
||||
type="text"
|
||||
/>
|
||||
@ -110,12 +110,12 @@ exports[`TextArea should support disabled 1`] = `
|
||||
|
||||
exports[`TextArea should support maxLength 1`] = `
|
||||
<TextArea
|
||||
maxLength="10"
|
||||
maxLength={10}
|
||||
prefixCls="ant-input"
|
||||
>
|
||||
<textarea
|
||||
className="ant-input"
|
||||
maxLength="10"
|
||||
maxLength={10}
|
||||
onChange={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
style={Object {}}
|
||||
|
@ -10,7 +10,7 @@ describe('Input', () => {
|
||||
focusTest(Input);
|
||||
|
||||
it('should support maxLength', () => {
|
||||
const wrapper = mount(<Input maxLength="3" />);
|
||||
const wrapper = mount(<Input maxLength={3} />);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@ -48,7 +48,7 @@ describe('TextArea', () => {
|
||||
});
|
||||
|
||||
it('should support maxLength', () => {
|
||||
const wrapper = mount(<TextArea maxLength="10" />);
|
||||
const wrapper = mount(<TextArea maxLength={10} />);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
@ -71,7 +71,7 @@ class NumericInput extends React.Component {
|
||||
onChange={this.onChange}
|
||||
onBlur={this.onBlur}
|
||||
placeholder="Input a number"
|
||||
maxLength="25"
|
||||
maxLength={25}
|
||||
/>
|
||||
</Tooltip>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user