Skip to content

Commit

Permalink
Merge pull request #54 from LuDreamst/fromLuDreamst
Browse files Browse the repository at this point in the history
fix 'some english char can't search'
  • Loading branch information
kenmingwang authored Sep 8, 2024
2 parents 9a97f15 + dd809c0 commit 814f6d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Fav.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ export const Fav = (function ({ FavList, onSongIndexChange, onAddOneFromFav, han
return
}

const lowerCaseSearchedVal = searchedVal.toLowerCase();
const filteredRows = FavList.songList.filter((row) => {
// const cleanString = row.name.replace('《') // TODO: some english char can't search
return row.name.includes(searchedVal)
// return row.name.includes(searchedVal)
return row.name.toLowerCase().includes(lowerCaseSearchedVal)
})
setRows(filteredRows)
}
Expand Down

0 comments on commit 814f6d9

Please sign in to comment.