diff --git a/package-lock.json b/package-lock.json index d10991bcc..2d1bf42e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2382,6 +2382,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { diff --git a/packages/components/dropdown/src/DropdownPopover.tsx b/packages/components/dropdown/src/DropdownPopover.tsx index 1ea4f409c..3ed9ae2f4 100644 --- a/packages/components/dropdown/src/DropdownPopover.tsx +++ b/packages/components/dropdown/src/DropdownPopover.tsx @@ -23,30 +23,32 @@ export const Popover = forwardRef( return () => setHasPopover(false) }, []) - return isOpen ? ( + return ( - { - /** - * With a combobox pattern, the focus should remain on the trigger at all times. - * Passing the focus to the dropdown popover would break keyboard navigation. - */ - e.preventDefault() - }} - {...props} - data-spark-component="dropdown-popover" - > - {children} - + {isOpen ? ( + { + /** + * With a combobox pattern, the focus should remain on the trigger at all times. + * Passing the focus to the dropdown popover would break keyboard navigation. + */ + e.preventDefault() + }} + {...props} + data-spark-component="dropdown-popover" + > + {children} + + ) : ( + children + )} - ) : ( - children ) } )