Skip to content

Commit

Permalink
chore: Enable case-insensitive search for large models (#4817)
Browse files Browse the repository at this point in the history
  • Loading branch information
xielong authored May 31, 2024
1 parent 3de8e8f commit e9904e6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ const Popup: FC<PopupProps> = ({
model => model.models.filter(
(modelItem) => {
if (modelItem.label[language] !== undefined)
return modelItem.label[language].includes(searchText)
return modelItem.label[language].toLowerCase().includes(searchText.toLowerCase())

let found = false
Object.keys(modelItem.label).forEach((key) => {
if (modelItem.label[key].includes(searchText))
if (modelItem.label[key].toLowerCase().includes(searchText.toLowerCase()))
found = true
})

Expand Down

0 comments on commit e9904e6

Please sign in to comment.