diff --git a/src/components/CommandMenu/CommandMenu.tsx b/src/components/CommandMenu/CommandMenu.tsx index 822967dbb..f6ecf74fa 100644 --- a/src/components/CommandMenu/CommandMenu.tsx +++ b/src/components/CommandMenu/CommandMenu.tsx @@ -46,11 +46,13 @@ export function CommandMenu() { const normalizedSearchText = searchedText.trim().toLowerCase(); getAllPages().then((unfilteredPages = defaultPages) => { - const filteredPages = unfilteredPages.filter((currPage: PageType) => { - return ( - currPage.title.toLowerCase().indexOf(normalizedSearchText) !== -1 - ); - }); + const filteredPages = unfilteredPages + .filter((currPage: PageType) => { + return ( + currPage.title.toLowerCase().indexOf(normalizedSearchText) !== -1 + ); + }) + .slice(0, 10); setActiveCounter(0); setSearchResults(filteredPages); @@ -63,7 +65,7 @@ export function CommandMenu() { return (