偏右
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
11 additions and
1 deletions
-
components/input/Password.tsx
-
components/input/__tests__/Password.test.js
|
|
@ -55,7 +55,9 @@ export default class Password extends React.Component<PasswordProps, PasswordSta |
|
|
|
} |
|
|
|
|
|
|
|
saveInput = (instance: Input) => { |
|
|
|
this.input = instance.input; |
|
|
|
if (instance && instance.input) { |
|
|
|
this.input = instance.input; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
focus() { |
|
|
|
|
|
@ -61,4 +61,12 @@ describe('Input.Password', () => { |
|
|
|
.getDOMNode(), |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
// https://github.com/ant-design/ant-design/pull/18441
|
|
|
|
it('should unmount without error', () => { |
|
|
|
const wrapper = mount(<Input.Password />); |
|
|
|
expect(() => { |
|
|
|
wrapper.unmount(); |
|
|
|
}).not.toThrow(); |
|
|
|
}); |
|
|
|
}); |
|
|
|