From dd809c04e962031a8b4b1f0970bb3919c2d61bf9 Mon Sep 17 00:00:00 2001 From: vera ch'i Date: Fri, 2 Aug 2024 15:04:58 +0800 Subject: [PATCH] fix 'some english char can't search' --- src/components/Fav.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Fav.js b/src/components/Fav.js index 0a337aa7..9c6e1e05 100644 --- a/src/components/Fav.js +++ b/src/components/Fav.js @@ -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) }