Skip to content

Commit

Permalink
restore title ellipsis when overflowing
Browse files Browse the repository at this point in the history
  • Loading branch information
Athou committed Oct 29, 2022
1 parent c0937aa commit a11e528
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion commafeed-client/src/components/content/FeedEntryTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@ export interface FeedEntryTitleProps {
export function FeedEntryTitle(props: FeedEntryTitleProps) {
const search = useAppSelector(state => state.entries.search)
const keywords = search?.split(" ")
return <Highlight highlight={keywords ?? ""}>{props.entry.title}</Highlight>
return (
<Highlight
highlight={keywords ?? ""}
// make sure ellipsis is shown when title is too long
span
>
{props.entry.title}
</Highlight>
)
}

0 comments on commit a11e528

Please sign in to comment.