mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
Merge pull request #1086 from hansyulian/feature/improve-add-to-playlist-ux
Feature: improve add to playlist UX
This commit is contained in:
commit
60c94c2299
1 changed files with 7 additions and 0 deletions
|
|
@ -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', {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue