diff --git a/apify-docs-theme/src/theme/LLMButtons/index.jsx b/apify-docs-theme/src/theme/LLMButtons/index.jsx index 4e0aa6439..40ae016c4 100644 --- a/apify-docs-theme/src/theme/LLMButtons/index.jsx +++ b/apify-docs-theme/src/theme/LLMButtons/index.jsx @@ -186,41 +186,39 @@ function getButtonText({ status }) { } } -const MenuBase = ({ - children, - ref, - copyingStatus, - setCopyingStatus, - chevronIconRef, - ...props -}) => ( -
-
-
onCopyAsMarkdownClick({ setCopyingStatus })} - > - {copyingStatus === 'loading' && } - {copyingStatus === 'copied' && } - {copyingStatus === 'idle' && } -
- onCopyAsMarkdownClick({ setCopyingStatus })} - className={styles.llmButtonText} - > - {getButtonText({ status: copyingStatus })} - -
- +const MenuBase = React.forwardRef( + ( + { children, copyingStatus, setCopyingStatus, chevronIconRef, ...props }, + ref, + ) => ( +
+
+
onCopyAsMarkdownClick({ setCopyingStatus })} + > + {copyingStatus === 'loading' && } + {copyingStatus === 'copied' && } + {copyingStatus === 'idle' && } +
+ onCopyAsMarkdownClick({ setCopyingStatus })} + className={styles.llmButtonText} + > + {getButtonText({ status: copyingStatus })} + +
+ +
-
+ ), ); const Option = ({ Icon, label, description, showExternalIcon }) => ( @@ -278,14 +276,15 @@ export default function LLMButtons({ isApiReferencePage = false }) { ) } components={{ - MenuBase: (props) => ( + MenuBase: React.forwardRef((props, ref) => ( - ), + )), }} onSelect={onMenuOptionClick} options={DROPDOWN_OPTIONS}