From 34cad7df41f65166301400532bc38a249724ff1f Mon Sep 17 00:00:00 2001 From: a7m-1st Date: Wed, 4 Feb 2026 22:38:04 +0300 Subject: [PATCH] fix: popover aschild recursive loop --- src/components/ui/popover.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/ui/popover.tsx b/src/components/ui/popover.tsx index 5d060c83..d84b7c0c 100644 --- a/src/components/ui/popover.tsx +++ b/src/components/ui/popover.tsx @@ -103,11 +103,28 @@ const PopoverTrigger = React.forwardRef< disabled, showChevron = true, leadingIcon, + asChild, ...props }, ref ) => { const stateCls = resolveStateClasses(state, Boolean(disabled)); + + // When asChild is used, we need to ensure only a single child is passed + // The custom wrapper UI (title, note, chevron) is incompatible with asChild + if (asChild) { + return ( + + {children} + + ); + } + return (
{title ? (