fix: attachment field set as single and doesn't display re-uploaded attachments after deleted (#3469)

This commit is contained in:
katherinehhh 2024-01-31 09:08:35 +08:00 committed by GitHub
parent 5fa430585c
commit 89bf75871f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,6 +124,7 @@ Upload.Attachment = connect((props: UploadProps) => {
setFileList((prevFileList) => { setFileList((prevFileList) => {
if (!multiple) { if (!multiple) {
onChange?.(null as any); onChange?.(null as any);
setSync(true);
return []; return [];
} }
const index = prevFileList.indexOf(file); const index = prevFileList.indexOf(file);