Multipart request file - Fix init value and clear value (#2609)

This commit is contained in:
Max Destors
2024-07-17 12:11:25 +02:00
committed by GitHub
parent 81497d8397
commit e60aaf2ea9
3 changed files with 6 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ const FilePickerEditor = ({ value, onChange, collection }) => {
};
const clear = () => {
onChange('');
onChange([]);
};
const renderButtonText = (filenames) => {

View File

@@ -24,7 +24,8 @@ const MultipartFormParams = ({ item, collection }) => {
addMultipartFormParam({
itemUid: item.uid,
collectionUid: collection.uid,
type: 'text'
type: 'text',
value: ''
})
);
};
@@ -34,7 +35,8 @@ const MultipartFormParams = ({ item, collection }) => {
addMultipartFormParam({
itemUid: item.uid,
collectionUid: collection.uid,
type: 'file'
type: 'file',
value: []
})
);
};

View File

@@ -717,7 +717,7 @@ export const collectionsSlice = createSlice({
uid: uuid(),
type: action.payload.type,
name: '',
value: '',
value: action.payload.value,
description: '',
enabled: true
});