diff --git a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx index 4133f2960..4f23693ad 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx @@ -53,7 +53,8 @@ export function RowActions({ document.document_type as (typeof NON_DELETABLE_DOCUMENT_TYPES)[number] ); - // Delete is disabled while processing + // Edit and Delete are disabled while processing + const isEditDisabled = isBeingProcessed; const isDeleteDisabled = isBeingProcessed; const handleDelete = async () => { @@ -97,7 +98,11 @@ export function RowActions({ - + !isEditDisabled && handleEdit()} + disabled={isEditDisabled} + className={isEditDisabled ? "text-muted-foreground cursor-not-allowed opacity-50" : ""} + > Edit @@ -142,7 +147,11 @@ export function RowActions({ - + !isEditDisabled && handleEdit()} + disabled={isEditDisabled} + className={isEditDisabled ? "text-muted-foreground cursor-not-allowed opacity-50" : ""} + > Edit