fix: Fixes Import button staying disabled after untoggling option to add notes to a tag (#2981)

This commit is contained in:
Antonella Sgarlatta
2026-02-24 13:00:56 -03:00
committed by GitHub
parent 5e53ec3ff7
commit 75c3e2e6fd

View File

@@ -46,7 +46,7 @@ const ImportModal = ({ importModalController }: { importModalController: ImportM
onClick: parseAndImport, onClick: parseAndImport,
hidden: !isReadyToImport, hidden: !isReadyToImport,
mobileSlot: 'right', mobileSlot: 'right',
disabled: !isReadyToImport || (!shouldCreateTag && !existingTagForImports), disabled: !isReadyToImport || (addImportsToTag && !shouldCreateTag && !existingTagForImports),
}, },
{ {
label: importSuccessOrError ? 'Close' : 'Cancel', label: importSuccessOrError ? 'Close' : 'Cancel',
@@ -55,7 +55,15 @@ const ImportModal = ({ importModalController }: { importModalController: ImportM
mobileSlot: 'left', mobileSlot: 'left',
}, },
], ],
[close, existingTagForImports, importSuccessOrError, isReadyToImport, parseAndImport, shouldCreateTag], [
addImportsToTag,
close,
existingTagForImports,
importSuccessOrError,
isReadyToImport,
parseAndImport,
shouldCreateTag,
],
) )
const selectFiles = useCallback( const selectFiles = useCallback(