From 682e641c1565c5b03d49540336b74cae3dc7af95 Mon Sep 17 00:00:00 2001 From: Amine Afia Date: Thu, 29 May 2025 15:49:41 +0200 Subject: [PATCH] Fix webhook dropdown scrolling by wrapping content in scrollable div --- .../webhooks/components/FilterDetailsStep.tsx | 193 +++++++++--------- 1 file changed, 96 insertions(+), 97 deletions(-) diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/FilterDetailsStep.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/FilterDetailsStep.tsx index 1a1fbf01038..8dcc1887e02 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/FilterDetailsStep.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/FilterDetailsStep.tsx @@ -280,7 +280,7 @@ export function FilterDetailsStep({ {/* Advanced Options Section */}
- {/* Signature Hash Field - reused for both event and transaction types */} + {/* Signature Hash Field - rebuilt for both event and transaction types */}
- {watchFilterType === "event" && - Object.keys(fetchedAbis).length > 0 && - eventSignatures.length > 0 ? ( - { + field.onChange(value); + const selectedEvent = eventSignatures.find( + (sig) => sig.signature === value, ); - - return ( + form.setValue("sigHashAbi", selectedEvent?.abi || ""); + }} + > + + + {field.value + ? eventSignatures.find( + (sig) => sig.signature === field.value, + )?.name || "" + : null} + + + + {eventSignatures.map((event) => ( {event.name} - Signature: {truncatedHash} + Signature:{" "} + {truncateMiddle(event.signature, 6, 4)} + ))} + + + ) : ( + + ) + ) : watchFilterType === "transaction" ? ( + functionSignatures && functionSignatures.length > 0 ? ( + - ) : watchFilterType === "transaction" && - Object.keys(fetchedTxAbis).length > 0 && - functionSignatures.length > 0 ? ( - - ) : ( - - )} + form.setValue( + "sigHashAbi", + selectedFunction?.abi || "", + ); + }} + > + + + {field.value + ? functionSignatures.find( + (sig) => sig.signature === field.value, + )?.name || "" + : null} + + + + {functionSignatures.map((func) => ( + +
+ + {func.name} + + + Selector: {truncateMiddle(func.signature, 6, 4)} + +
+
+ ))} +
+ + ) : ( + + ) + ) : null}