Skip to content

Commit

Permalink
fix: setSearchText
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Dec 8, 2023
1 parent 425b0c7 commit b8e3fe1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion src/components/playlist/usePlaylistRN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ export default (playlist: NoxMedia.Playlist) => {
refreshPlaylist,
cachedSongs,
setCachedSongs,
searchText,
handleSearch,
playSong,
scrollTo,
Expand Down
1 change: 1 addition & 0 deletions src/hooks/usePlaylist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const usePlaylist = (playlist: NoxMedia.Playlist): UsePlaylist => {
const searchBarRef = useRef();

const handleSearch = (searchedVal: string) => {
setSearchText(searchedVal);
if (searchedVal === '') {
setRows(playlist.songList);
return;
Expand Down

0 comments on commit b8e3fe1

Please sign in to comment.