diff --git a/src/components/launch/SourceSelector.tsx b/src/components/launch/SourceSelector.tsx index 73ea5a79..f642953b 100644 --- a/src/components/launch/SourceSelector.tsx +++ b/src/components/launch/SourceSelector.tsx @@ -314,36 +314,45 @@ export const SourceSelector = React.memo(function SourceSelector({ } }, [isAutonomous, internalOpen]); + const trigger = children ? ( + React.isValidElement(children) ? ( + React.cloneElement(children as React.ReactElement, { + onPointerEnter: prefetchSources, + onFocusCapture: prefetchSources, + }) + ) : ( + children + ) + ) : ( + + ); + return ( - -
- {children || ( - - )} -
-
+ {trigger}