fix: keep tag title in dropdown in its original case
This commit is contained in:
@@ -93,13 +93,12 @@ export const AutocompleteTagInput: FunctionalComponent<Props> = ({
|
|||||||
>
|
>
|
||||||
<Icon type="hashtag" className="color-neutral mr-2" />
|
<Icon type="hashtag" className="color-neutral mr-2" />
|
||||||
{tag.title
|
{tag.title
|
||||||
.toLowerCase()
|
|
||||||
.split(new RegExp(`(${searchQuery})`, 'gi'))
|
.split(new RegExp(`(${searchQuery})`, 'gi'))
|
||||||
.map((substring, index) => (
|
.map((substring, index) => (
|
||||||
<span
|
<span
|
||||||
key={index}
|
key={index}
|
||||||
className={
|
className={
|
||||||
substring?.toLowerCase() === searchQuery.toLowerCase()
|
substring.toLowerCase() === searchQuery.toLowerCase()
|
||||||
? 'font-bold whitespace-pre-wrap'
|
? 'font-bold whitespace-pre-wrap'
|
||||||
: 'whitespace-pre-wrap'
|
: 'whitespace-pre-wrap'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user