Skip to content

Commit

Permalink
fix: keep tag title in dropdown in its original case
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonella Sgarlatta committed May 24, 2021
1 parent b6aaa49 commit 447c010
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/assets/javascripts/components/AutocompleteTagInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,12 @@ export const AutocompleteTagInput: FunctionalComponent<Props> = ({
>
<Icon type="hashtag" className="color-neutral mr-2" />
{tag.title
.toLowerCase()
.split(new RegExp(`(${searchQuery})`, 'gi'))
.map((substring, index) => (
<span
key={index}
className={
substring?.toLowerCase() === searchQuery.toLowerCase()
substring.toLowerCase() === searchQuery.toLowerCase()
? 'font-bold whitespace-pre-wrap'
: 'whitespace-pre-wrap'
}
Expand Down

0 comments on commit 447c010

Please sign in to comment.