mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:25:15 +00:00
fix(plugin-fm): set invalid when uploading is not completed to avoid submit (#4653)
This commit is contained in:
parent
1d568c635e
commit
a38e4ada05
@ -345,11 +345,10 @@ export function Uploader({ rules, ...props }: UploadProps) {
|
||||
const beforeUpload = useBeforeUpload(rules);
|
||||
|
||||
useEffect(() => {
|
||||
const error = pendingList.find((file) => file.status === 'error');
|
||||
if (error) {
|
||||
if (pendingList.length) {
|
||||
field.setFeedback({
|
||||
type: 'error',
|
||||
code: 'UploadError',
|
||||
code: 'ValidateError',
|
||||
messages: [t('Incomplete uploading files need to be resolved')],
|
||||
});
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user