From 9a21e53d515a1a0ec80de4de96f3331346b13a9e Mon Sep 17 00:00:00 2001 From: pgayvallet Date: Sun, 22 Nov 2020 16:17:28 +0100 Subject: [PATCH] hide icon for non-application results --- .../global_search_bar/public/components/search_bar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/global_search_bar/public/components/search_bar.tsx b/x-pack/plugins/global_search_bar/public/components/search_bar.tsx index c85b12669b339..3746e636066a9 100644 --- a/x-pack/plugins/global_search_bar/public/components/search_bar.tsx +++ b/x-pack/plugins/global_search_bar/public/components/search_bar.tsx @@ -71,12 +71,14 @@ const sortByTitle = (a: GlobalSearchResult, b: GlobalSearchResult): number => { const resultToOption = (result: GlobalSearchResult): EuiSelectableTemplateSitewideOption => { const { id, title, url, icon, type, meta } = result; + // only displaying icons for applications + const useIcon = type === 'application'; const option: EuiSelectableTemplateSitewideOption = { key: id, label: title, url, type, - icon: { type: icon ?? 'empty' }, + icon: { type: useIcon && icon ? icon : 'empty' }, 'data-test-subj': `nav-search-option`, };