fix sidedrawer image uploader

This commit is contained in:
shamsmosowi
2022-10-11 23:13:48 +02:00
parent 4618a1d5b1
commit 40600dabaa
2 changed files with 2 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ export default function File_({
const onDrop = useCallback(
(acceptedFiles: File[]) => {
if (acceptedFiles.length > 0) {
if (_rowy_ref && acceptedFiles.length > 0) {
upload({
docRef: _rowy_ref! as any,
fieldName: column.key,

View File

@@ -105,6 +105,7 @@ export default function Image_({
files: acceptedFiles,
onComplete: (newUploads) => {
onChange(arrayUnion(newUploads));
onSubmit();
setLocalImages([]);
},
});