mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
feature: improve add to playlist UX
This commit is contained in:
@@ -36,6 +36,7 @@ export const AddToPlaylistContextModal = ({
|
|||||||
const { albumId, artistId, genreId, songId } = innerProps;
|
const { albumId, artistId, genreId, songId } = innerProps;
|
||||||
const server = useCurrentServer();
|
const server = useCurrentServer();
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
const [isDropdownOpened, setIsDropdownOpened] = useState(true);
|
||||||
|
|
||||||
const addToPlaylistMutation = useAddToPlaylist({});
|
const addToPlaylistMutation = useAddToPlaylist({});
|
||||||
|
|
||||||
@@ -235,7 +236,13 @@ export const AddToPlaylistContextModal = ({
|
|||||||
})}
|
})}
|
||||||
searchable
|
searchable
|
||||||
size="md"
|
size="md"
|
||||||
|
dropdownOpened={isDropdownOpened}
|
||||||
{...form.getInputProps('playlistId')}
|
{...form.getInputProps('playlistId')}
|
||||||
|
onClick={() => setIsDropdownOpened(true)}
|
||||||
|
onChange={(e) => {
|
||||||
|
setIsDropdownOpened(false);
|
||||||
|
form.getInputProps('playlistId').onChange(e);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<Switch
|
<Switch
|
||||||
label={t('form.addToPlaylist.input', {
|
label={t('form.addToPlaylist.input', {
|
||||||
|
|||||||
Reference in New Issue
Block a user