Skip to content

Commit

Permalink
use getVisibleTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Jul 2, 2020
1 parent 3ba6e89 commit 63e7c2d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export const createSavedObjectsResultProvider = (): GlobalSearchResultProvider =
const { typeRegistry, client } = core.savedObjects;

const searchableTypes = typeRegistry
.getAllTypes()
.filter((type) => !typeRegistry.isHidden(type.name))
.getVisibleTypes()
.filter((type) => type.management?.defaultSearchField && type.management?.getInAppUrl);
const searchFields = uniq(
searchableTypes.map((type) => type.management!.defaultSearchField!)
Expand Down

0 comments on commit 63e7c2d

Please sign in to comment.