From e5c125d8ced10af0c9fbfa274f12fe935e69bda8 Mon Sep 17 00:00:00 2001 From: Suchit Sahoo <38322563+LDrago27@users.noreply.github.com> Date: Fri, 30 Aug 2024 11:53:09 -0700 Subject: [PATCH] Fix Run button position when datepicker is not visible (#7935) Signed-off-by: Suchit Sahoo --- .../public/top_nav_menu/top_nav_menu.tsx | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx b/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx index ffc6656144f8..e1d93a560e53 100644 --- a/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx +++ b/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx @@ -202,31 +202,20 @@ export function TopNavMenu(props: TopNavMenuProps): ReactElement | null { // Show the SearchBar in-place default: - if (showDatePicker === TopNavMenuItemRenderType.IN_PORTAL) { - return ( - <> - - - - {screenTitle} - - {renderMenu(menuClassName)} - -
- - - - {renderSearchBar({ datePickerRef })} - - ); - } - return ( <> - {renderMenu(menuClassName)} + + + {screenTitle} + + {renderMenu(menuClassName)} + +
+ + - {renderSearchBar()} + {renderSearchBar({ datePickerRef })} ); }