diff --git a/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx b/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx index f37c2be1eb9e..7d2be2066d50 100644 --- a/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx +++ b/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx @@ -26,7 +26,7 @@ interface LogsFormatOptionsMenuProps { config: OptionsMenuConfig; } -export default function LogsFormatOptionsMenu({ +function OptionsMenu({ items, selectedOptionFormat, config, @@ -49,7 +49,6 @@ export default function LogsFormatOptionsMenu({ const [selectedValue, setSelectedValue] = useState(null); const listRef = useRef(null); const initialMouseEnterRef = useRef(false); - const [isPopoverOpen, setIsPopoverOpen] = useState(false); const onChange = useCallback( (key: LogViewMode) => { @@ -209,7 +208,7 @@ export default function LogsFormatOptionsMenu({ }; }, [selectedValue]); - const popoverContent = ( + return (
); +} + +function LogsFormatOptionsMenu({ + items, + selectedOptionFormat, + config, +}: LogsFormatOptionsMenuProps): JSX.Element { + const [isPopoverOpen, setIsPopoverOpen] = useState(false); return ( + } trigger="click" placement="bottomRight" arrow={false} open={isPopoverOpen} onOpenChange={setIsPopoverOpen} rootClassName="format-options-popover" + destroyTooltipOnHide >
-
-
+ {showLiveLogsFrequencyChart && (