Revert "fix: Drapper mulitple should work" (#18626)

This reverts commit 06d7f0deec.
This commit is contained in:
二货机器人 2019-09-03 12:35:55 +08:00 committed by GitHub
parent e4a3b72e78
commit e5d644f71a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 30 deletions

View File

@ -81,12 +81,6 @@ class Upload extends React.Component<UploadProps, UploadState> {
onStart = (file: RcFile) => {
const { fileList } = this.state;
const { multiple } = this.props;
if (!multiple && fileList.length > 0) {
return;
}
const targetItem = fileToObject(file);
targetItem.status = 'uploading';

View File

@ -484,28 +484,4 @@ describe('Upload', () => {
);
errorSpy.mockRestore();
});
it('not allow multiple upload when multiple is false', done => {
const onChange = jest.fn();
const wrapper = mount(
<Upload
fileList={[{ uid: '903', file: 'bamboo.png' }]}
action="http://upload.com"
onChange={onChange}
multiple={false}
/>,
);
wrapper.find('input').simulate('change', {
target: {
files: [{ file: 'light.png' }],
},
});
setTimeout(() => {
expect(onChange).not.toHaveBeenCalled();
done();
});
});
});