소스 검색

reset error on file change (#748)

mikkio 3 년 전
부모
커밋
93ef92f6bc
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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) => {