Skip to content

Commit

Permalink
fix: truncate description, set max width
Browse files Browse the repository at this point in the history
  • Loading branch information
kahboom committed Nov 28, 2024
1 parent c2a9cd7 commit 6a53f70
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/src/app/pages/search/components/SearchMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function useAllEntities() {
const transformedAdvisories: IEntity[] = advisories.map((item) => ({
id: item.identifier,
title: item.identifier,
description: item.title,
description: item.title?.substring(0, 75),
navLink: `/advisories/${item.uuid}`,
type: "Advisory",
typeColor: "blue",
Expand Down Expand Up @@ -86,7 +86,7 @@ function useAllEntities() {
(item) => ({
id: item.identifier,
title: item.identifier,
description: item.description,
description: item.description?.substring(0, 75),
navLink: `/vulnerabilities/${item.identifier}`,
type: "CVE",
typeColor: "orange",
Expand Down Expand Up @@ -271,7 +271,11 @@ export const SearchMenu: React.FC<ISearchMenu> = ({ onChangeSearch }) => {
}, [isAutocompleteOpen]);

const autocomplete = (
<Menu ref={autocompleteRef} onSelect={onSelect}>
<Menu
ref={autocompleteRef}
onSelect={onSelect}
style={{ maxWidth: "450px" }}
>
<MenuContent>
<MenuList>{autocompleteOptions}</MenuList>
</MenuContent>
Expand Down

0 comments on commit 6a53f70

Please sign in to comment.