Browse Source

reset error on file change (#748)

mikkio 3 years ago
parent
commit
93ef92f6bc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/views/studio/EditVideoSheet/EditVideoForm/EditVideoForm.tsx

+ 2 - 0
src/views/studio/EditVideoSheet/EditVideoForm/EditVideoForm.tsx

@@ -282,6 +282,7 @@ export const EditVideoForm: React.FC<EditVideoFormProps> = ({
       setValue('title', videoNameWithoutExtension, { shouldDirty: true })
       handleFormChange()
     }
+    setFileSelectError(null)
   }
 
   const handleThumbnailFileChange = async (thumbnail: ImageInputFile | null) => {
@@ -296,6 +297,7 @@ export const EditVideoForm: React.FC<EditVideoFormProps> = ({
     if (thumbnail?.blob) {
       onThumbnailFileChange(thumbnail.blob)
     }
+    setFileSelectError(null)
   }
 
   const handleFileSelectError = async (errorCode: FileErrorType | null) => {