fix: attachment field in m2m association field report error whwen setting required (#3031)
This commit is contained in:
parent
13be8d012f
commit
4d4b73767f
@ -185,6 +185,7 @@ export function useUploadProps<T extends IUploadProps = UploadProps>({ serviceEr
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
formData.append(filename, file);
|
formData.append(filename, file);
|
||||||
|
// eslint-disable-next-line promise/catch-or-return
|
||||||
api.axios
|
api.axios
|
||||||
.post(action, formData, {
|
.post(action, formData, {
|
||||||
withCredentials,
|
withCredentials,
|
||||||
@ -227,7 +228,7 @@ export const toItem = (file) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const toFileList = (fileList: any) => {
|
export const toFileList = (fileList: any) => {
|
||||||
return toArr(fileList).map(toItem);
|
return toArr(fileList?.filter(Boolean)).map(toItem);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const toValue = (fileList: any) => {
|
export const toValue = (fileList: any) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user