diff --git a/catalog/app/containers/Bucket/PackageDialog/FilesInput.tsx b/catalog/app/containers/Bucket/PackageDialog/FilesInput.tsx index 8a61eccc522..69bcc9f509b 100644 --- a/catalog/app/containers/Bucket/PackageDialog/FilesInput.tsx +++ b/catalog/app/containers/Bucket/PackageDialog/FilesInput.tsx @@ -1333,7 +1333,6 @@ interface FilesInputProps { onChange: (value: FilesState) => void } className?: string - disabled?: boolean errors?: Record meta: RF.FieldMetaState & { initial: FilesState } onFilesAction?: ( @@ -1361,7 +1360,6 @@ interface FilesInputProps { export function FilesInput({ input: { value, onChange }, className, - disabled = false, errors = {}, meta, onFilesAction, @@ -1391,13 +1389,13 @@ export function FilesInput({ } } - const submitting = meta.submitting || meta.submitSucceeded + const disabled = meta.submitting || meta.submitSucceeded || meta.validating const error = meta.submitFailed && (meta.error || (!meta.dirtySinceLastSubmit && meta.submitError)) const refProps = { value, - disabled: disabled || submitting, + disabled, initial: meta.initial, onChange, onFilesAction, @@ -1509,7 +1507,7 @@ export function FilesInput({
- {(submitting || disabled) && } + {disabled && }
{ if (dirtyFields?.name) handleNameChange(values.name) @@ -452,11 +451,9 @@ function PackageCreationForm({ const hashihgError = delayHashing && FI.validateHashingComplete(files) if (hashihgError) return hashihgError - setFilesDisabled(true) const entries = filesStateToEntries(files) const errors = await validateEntries(entries) setEntriesError(errors || null) - setFilesDisabled(false) if (errors?.length) { return 'schema' } @@ -632,7 +629,6 @@ function PackageCreationForm({ validationErrors={ submitFailed ? entriesError : PD.EMPTY_ENTRIES_ERRORS } - disabled={filesDisabled} /> )}