mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-24 07:30:57 +03:00
Limit number of playlists displayed in the sidebar, to avoid UI freezes
This commit is contained in:
parent
2b105ca77b
commit
e673360087
@ -18,3 +18,5 @@ DraggableTypes.ALL.push(
|
||||
DraggableTypes.DISC,
|
||||
DraggableTypes.ARTIST
|
||||
)
|
||||
|
||||
export const MAX_SIDEBAR_PLAYLISTS = 100
|
||||
|
@ -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' },
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user