Skip to content

Commit

Permalink
hide icon for non-application results
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Nov 22, 2020
1 parent 194f13b commit 9a21e53
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
};

Expand Down

0 comments on commit 9a21e53

Please sign in to comment.