diff --git a/ui/src/consts.js b/ui/src/consts.js index bda543514..101254ec8 100644 --- a/ui/src/consts.js +++ b/ui/src/consts.js @@ -18,3 +18,5 @@ DraggableTypes.ALL.push( DraggableTypes.DISC, DraggableTypes.ARTIST ) + +export const MAX_SIDEBAR_PLAYLISTS = 100 diff --git a/ui/src/layout/PlaylistsSubMenu.js b/ui/src/layout/PlaylistsSubMenu.js index 49d4611be..28c7c8d4f 100644 --- a/ui/src/layout/PlaylistsSubMenu.js +++ b/ui/src/layout/PlaylistsSubMenu.js @@ -13,7 +13,7 @@ import { BiCog } from 'react-icons/all' import { useDrop } from 'react-dnd' import SubMenu from './SubMenu' import { isWritable } from '../common' -import { DraggableTypes } from '../consts' +import { DraggableTypes, MAX_SIDEBAR_PLAYLISTS } from '../consts' const PlaylistMenuItemLink = ({ pls, sidebarIsOpen }) => { const dataProvider = useDataProvider() @@ -56,7 +56,7 @@ const PlaylistsSubMenu = ({ state, setState, sidebarIsOpen, dense }) => { payload: { pagination: { page: 0, - perPage: 0, + perPage: MAX_SIDEBAR_PLAYLISTS, }, sort: { field: 'name' }, },