diff --git a/packages/gatsby-theme-carbon/src/components/GlobalSearch/GlobalSearch.js b/packages/gatsby-theme-carbon/src/components/GlobalSearch/GlobalSearch.js
index e49a4c5bb..db70361f2 100644
--- a/packages/gatsby-theme-carbon/src/components/GlobalSearch/GlobalSearch.js
+++ b/packages/gatsby-theme-carbon/src/components/GlobalSearch/GlobalSearch.js
@@ -33,9 +33,8 @@ import {
import Menu, { MenuContext } from './Menu';
-const MAX_RESULT_LIST_SIZE = 8;
+const MAX_RESULT_LIST_SIZE = 12;
-// TODO pass magnifying ref for escape/close? keep focus within outline for input,
const GlobalSearchInput = () => {
const data = useStaticQuery(graphql`
query {
@@ -46,8 +45,8 @@ const GlobalSearchInput = () => {
}
`);
- const index = data.localSearchPages.index;
- const store = data.localSearchPages.store;
+ const { index } = data.localSearchPages;
+ const { store } = data.localSearchPages;
const optionsRef = useRef([]);
const [focusedItem, setFocusedItem] = useState(0);
@@ -60,6 +59,8 @@ const GlobalSearchInput = () => {
const { toggleNavState, searchIsOpen, isManagingFocus, setIsManagingFocus } =
useContext(NavContext);
+ const trimmedResults = results.slice(0, MAX_RESULT_LIST_SIZE);
+
const clearAndClose = useCallback(() => {
setQuery('');
toggleNavState('searchIsOpen', 'close');
@@ -197,7 +198,7 @@ const GlobalSearchInput = () => {