mirror of
https://github.com/rowyio/rowy.git
synced 2026-02-25 04:31:34 +01:00
fix sidedrawer image uploader
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -105,6 +105,7 @@ export default function Image_({
|
||||
files: acceptedFiles,
|
||||
onComplete: (newUploads) => {
|
||||
onChange(arrayUnion(newUploads));
|
||||
onSubmit();
|
||||
setLocalImages([]);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user