Skip to content

Commit

Permalink
Merge branch 'main' into ppl-autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
paulstn authored Aug 30, 2024
2 parents 6754d6c + e5c125d commit 087a7f0
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,31 +202,20 @@ export function TopNavMenu(props: TopNavMenuProps): ReactElement | null {

// Show the SearchBar in-place
default:
if (showDatePicker === TopNavMenuItemRenderType.IN_PORTAL) {
return (
<>
<MountPointPortal setMountPoint={setMenuMountPoint}>
<EuiFlexGroup alignItems="stretch" gutterSize="none">
<EuiFlexItem grow={false} className="osdTopNavMenuScreenTitle">
<EuiText size="s">{screenTitle}</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>{renderMenu(menuClassName)}</EuiFlexItem>
<EuiFlexItem className="globalDatePicker">
<div ref={datePickerRef} />
</EuiFlexItem>
</EuiFlexGroup>
</MountPointPortal>
{renderSearchBar({ datePickerRef })}
</>
);
}

return (
<>
<MountPointPortal setMountPoint={setMenuMountPoint}>
{renderMenu(menuClassName)}
<EuiFlexGroup alignItems="stretch" gutterSize="none">
<EuiFlexItem grow={false} className="osdTopNavMenuScreenTitle">
<EuiText size="s">{screenTitle}</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>{renderMenu(menuClassName)}</EuiFlexItem>
<EuiFlexItem className="globalDatePicker">
<div ref={datePickerRef} />
</EuiFlexItem>
</EuiFlexGroup>
</MountPointPortal>
{renderSearchBar()}
{renderSearchBar({ datePickerRef })}
</>
);
}
Expand Down

0 comments on commit 087a7f0

Please sign in to comment.