Update query refetch settings for all list-views

- Prevent refetching during selections to not break uniqueId
This commit is contained in:
jeffvli
2021-09-23 18:26:31 -07:00
parent bf207b4993
commit 5248d19dd4
5 changed files with 24 additions and 12 deletions

View File

@@ -79,7 +79,9 @@ export const GlobalContextMenu = () => {
const [shouldCreatePlaylist, setShouldCreatePlaylist] = useState(false);
const [newPlaylistName, setNewPlaylistName] = useState('');
const { data: playlists }: any = useQuery(['playlists', 'name'], () => getPlaylists('name'));
const { data: playlists }: any = useQuery(['playlists', 'name'], () => getPlaylists('name'), {
refetchOnWindowFocus: false,
});
const handleAddToQueue = () => {
const entriesByRowIndexAsc = _.orderBy(multiSelect.selected, 'rowIndex', 'asc');