Skip to content

Commit 76b1889

Browse files
fix: Add Fixed Height and Scroll to Search Dialog Result (#88)
### Description <!-- Please add PR description (don't leave blank) - example: This PR [adds/removes/fixes/replaces] the [feature/bug/etc] --> This PR adds a fixed height to the search dialog result in order to enable scrolling when the content exceeds the screen/viewport height. ### Related Issue <!-- Please prefix the issue number with Fixes/Resolves - example: Fixes #123 or Resolves #123 --> Fixes #77 ### Screenshots/Screencasts <!-- Please provide screenshots or video recording that demos your changes (especially if it's a visual change) --> ![image](https://github.com/user-attachments/assets/b4fc8d7c-5ad8-47f9-ae0a-d5e66df37bc3) ### Notes to Reviewer <!-- Please state here if you added a new npm packages, or any extra information that can help reviewer better review you changes --> --------- Co-authored-by: Olabode Lawal-Shittabey <babblebey@gmail.com>
1 parent b2342aa commit 76b1889

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/islands/search.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function SearchDialog() {
164164
className="absolute w-full h-full left-0 top-0 z-50 backdrop-blur-sm"
165165
/>
166166

167-
<div className="flex flex-col bg-white h-fit max-w-5xl w-full shadow-xl z-50 border rounded-lg overflow-hidden"
167+
<div className="flex flex-col bg-white h-fit max-w-5xl max-h-full w-full shadow-xl z-50 border rounded-lg overflow-hidden"
168168
onMouseMove={() => cursor !== -1 && setCursor(-1)}
169169
>
170170
{/* Form Field */}
@@ -222,7 +222,7 @@ function SearchResult({ result = [], cursor, searchTerm }) {
222222
const router = useRouter();
223223

224224
return (
225-
<div className="block w-full text-sm md:text-base">
225+
<div className="block w-full text-sm md:text-base overflow-y-scroll scrollbar">
226226
{result.length < 1 && searchTerm.length >= 1 ? (
227227
/**
228228
* @todo add message suggesting adding/contributing the word to dictionary

0 commit comments

Comments
 (0)