diff --git a/src/components/Header/Search/Search.module.css b/src/components/Header/Search/Search.module.css index 49570f7df..80f0b935e 100644 --- a/src/components/Header/Search/Search.module.css +++ b/src/components/Header/Search/Search.module.css @@ -6,7 +6,7 @@ top: 65px; left: 0; right: 0; - height: 100vh; + height: calc(100vh - 65px); padding-top: 60px; border-radius: 0; } @@ -14,7 +14,6 @@ #searchModal.large { top: 0; height: fit-content; - max-height: 80vh; background: #fff; position: absolute; border-radius: 24px; @@ -24,7 +23,7 @@ .resultsWrapper { padding: 20px 20px 1rem; - overflow: overlay; + height: calc(100% - 50px); } .searchInput { @@ -129,11 +128,6 @@ box-sizing: content-box; } -.hitWrapper { - max-height: 40vh; - overflow: overlay; -} - .hitWrapper ol { list-style: none; } @@ -147,6 +141,9 @@ .queryResults { display: grid; grid-template-columns: 1fr; + grid-auto-rows: max-content; + height: 100%; + overflow-y: auto; } .queryResults h6 { @@ -224,8 +221,8 @@ } .hitWrapper { - max-height: calc(80vh - 100px); - overflow: auto; + max-height: calc(80vh - 150px); + overflow-y: auto; } .hitList li { @@ -259,4 +256,9 @@ .resultsWrapper * { padding-left: 0 !important; } + + .queryResults.large { + max-height: calc(80vh - 48px); + height: max-content; + } } diff --git a/src/components/Header/Search/SearchModal.tsx b/src/components/Header/Search/SearchModal.tsx index 8e88e4ff4..81f52428e 100644 --- a/src/components/Header/Search/SearchModal.tsx +++ b/src/components/Header/Search/SearchModal.tsx @@ -29,14 +29,15 @@ const recommendedArticles = [ }, ] -function EmptyQueryBoundary({ children, fallback }) { +function EmptyQueryBoundary({ children, size, fallback }) { const { indexUiState } = useInstantSearch() const recentArticles = JSON.parse(localStorage.getItem("recentArticles") || "[]") + console.log(indexUiState, "indexUiState") if (!indexUiState.query) { return ( -