From 5bc28bd4fdd60720fa7f12adfcae45c12ec16efe Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Thu, 19 Jun 2025 02:18:20 +0530 Subject: [PATCH] (fix:prompts) show delete only when possible --- frontend/src/components/Dropdown.tsx | 13 ++++++++++--- frontend/src/settings/Prompts.tsx | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Dropdown.tsx b/frontend/src/components/Dropdown.tsx index 3091fba3..ebc8648f 100644 --- a/frontend/src/components/Dropdown.tsx +++ b/frontend/src/components/Dropdown.tsx @@ -53,7 +53,7 @@ function Dropdown({ darkBorderColor?: string; showEdit?: boolean; onEdit?: (value: { name: string; id: string; type: string }) => void; - showDelete?: boolean; + showDelete?: boolean | ((option: any) => boolean); onDelete?: (value: string) => void; placeholder?: string; placeholderTextColor?: string; @@ -173,8 +173,15 @@ function Dropdown({ )} {showDelete && onDelete && (