From f56f5a281e86d4dd1730e3f6b7f26b0937231c16 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Fri, 6 Feb 2026 05:15:35 +0530 Subject: [PATCH] fix: disable Edit and Delete actions while processing in RowActions component --- .../documents/(manage)/components/RowActions.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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