Преглед на файлове

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) => {