diff --git a/src/legacy/core_plugins/data/public/query/query_bar/components/query_bar.tsx b/src/legacy/core_plugins/data/public/query/query_bar/components/query_bar.tsx index ab549896b5824..d790e07ee678b 100644 --- a/src/legacy/core_plugins/data/public/query/query_bar/components/query_bar.tsx +++ b/src/legacy/core_plugins/data/public/query/query_bar/components/query_bar.tsx @@ -266,7 +266,12 @@ export class QueryBarUI extends Component { }); return ( - + {this.renderQueryInput()} {this.renderUpdateButton()} diff --git a/src/legacy/core_plugins/kibana_react/public/top_nav_menu/top_nav_menu.tsx b/src/legacy/core_plugins/kibana_react/public/top_nav_menu/top_nav_menu.tsx index 6b1c207982873..845998c3eefa8 100644 --- a/src/legacy/core_plugins/kibana_react/public/top_nav_menu/top_nav_menu.tsx +++ b/src/legacy/core_plugins/kibana_react/public/top_nav_menu/top_nav_menu.tsx @@ -44,58 +44,71 @@ type Props = Partial & { export function TopNavMenu(props: Props) { function renderItems() { - if (!props.config) return; - return props.config.map((menuItem: TopNavMenuData, i: number) => { - return ( - - - - ); - }); + if (!props.config) { + return null; + } + + return ( + + {props.config.map((menuItem: TopNavMenuData, i: number) => { + return ( + + + + ); + })} + + ); } function renderSearchBar() { // Validate presense of all required fields - if (!props.showSearchBar) return; + if (!props.showSearchBar) { + return null; + } return ( - + + + ); } function renderLayout() { + const direction = props.showSearchBar && props.showFilterBar ? 'column' : 'row'; + return ( - + {renderItems()} + {renderSearchBar()} - {renderSearchBar()} ); }