feat(search view v2): update API.searchSongs

This commit is contained in:
Amaury Danis Cousandier
2024-01-13 10:00:59 +01:00
parent 131d7bf688
commit f2ad34c8ab
4 changed files with 19 additions and 8 deletions
+10 -1
View File
@@ -150,7 +150,7 @@ const SearchBarComponent = (props: { onValidate: (searchData: searchProps) => vo
props.onValidate({
artist: artist.id,
genre:
genresQuery.data?.find((g) => g.name === genre)
genresQuery.data?.find((a) => a.name === genre)
?.id ?? undefined,
query: query,
});
@@ -167,6 +167,15 @@ const SearchBarComponent = (props: { onValidate: (searchData: searchProps) => vo
accessibilityLabel="Genre"
onValueChange={(itemValue) => {
setGenre(itemValue);
props.onValidate({
artist:
artistsQuery.data?.find((a) => a.name === artist)?.id ??
undefined,
genre:
genresQuery.data?.find((g) => g.name === itemValue)?.id ??
undefined,
query: query,
});
}}
>
<Select.Item label={translate('emptySelection')} value="" />