fix: onChange should always return proxy file (#29627)

This commit is contained in:
二货机器人 2021-03-05 16:57:21 +08:00 committed by GitHub
parent 9b82fafb7e
commit ef4b67d4c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ const InternalUpload: React.ForwardRefRenderFunction<unknown, UploadProps> = (pr
}
});
onInternalChange(filteredFileInfoList[0]?.file, newFileList);
onInternalChange(objectFileList[0], newFileList);
};
const onStart = (file: RcFile) => {

View File

@ -635,12 +635,12 @@ describe('Upload', () => {
switch (callTimes) {
case 1:
expect(e.file.originFileObj).toBeTruthy();
expect(file.status).toBe(undefined);
break;
case 2:
case 3:
console.log('===>', file.status);
expect(file).toEqual(expect.objectContaining({ status: 'uploading', percent: 0 }));
break;