Add comment about e.target.value = null

This commit is contained in:
ekzyis 2023-10-27 02:25:09 +02:00
parent 619461c15d
commit d8f502254c

View File

@ -220,7 +220,8 @@ export const ImageUpload = forwardRef(({ children, className, onSelect, onUpload
} }
if (onSelect) await onSelect?.(file, s3Upload) if (onSelect) await onSelect?.(file, s3Upload)
else await s3Upload(file) else await s3Upload(file)
// TODO find out if this is needed and if so, why (copied from components/upload.js) // reset file input
// see https://bobbyhadz.com/blog/react-reset-file-input#reset-a-file-input-in-react
e.target.value = null e.target.value = null
} }
}} }}