Skip to content

Commit

Permalink
handle case where no results are being shown
Browse files Browse the repository at this point in the history
Signed-off-by: James Humphries <[email protected]>
  • Loading branch information
Yantrio committed Aug 30, 2024
1 parent 1392654 commit a0f7ccc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ export function Search() {
/>
<ComboboxInput
ref={inputRef}
displayValue={(result: SearchResult) => result.title}
displayValue={(result: SearchResult) =>
(result || {}).displayTitle || ""
}
onChange={(event) => onChange(event.target.value)}
placeholder="Search resources (Press / to focus)"
className="relative block h-9 w-96 appearance-none border border-transparent bg-gray-200 px-4 pl-8 text-inherit placeholder:text-gray-500 focus:border-brand-700 focus:outline-none dark:bg-gray-800"
Expand Down

0 comments on commit a0f7ccc

Please sign in to comment.