mirror of
https://github.com/navidrome/navidrome.git
synced 2025-05-06 21:31:07 +03:00
Do not show a "loading" datagrid for an empty playlist
This commit is contained in:
parent
c6f23139bc
commit
2adb290c34
@ -20,7 +20,7 @@ const PlaylistFilter = (props) => (
|
|||||||
|
|
||||||
const PlaylistList = (props) => (
|
const PlaylistList = (props) => (
|
||||||
<List {...props} exporter={false} filters={<PlaylistFilter />}>
|
<List {...props} exporter={false} filters={<PlaylistFilter />}>
|
||||||
<Datagrid rowClick="show" isRowSelectable={(r) => isWritable(r.owner)}>
|
<Datagrid rowClick="show" isRowSelectable={(r) => isWritable(r && r.owner)}>
|
||||||
<TextField source="name" />
|
<TextField source="name" />
|
||||||
<TextField source="owner" />
|
<TextField source="owner" />
|
||||||
<BooleanField source="public" />
|
<BooleanField source="public" />
|
||||||
|
@ -78,7 +78,11 @@ const PlaylistSongs = (props) => {
|
|||||||
const refresh = useRefresh()
|
const refresh = useRefresh()
|
||||||
const notify = useNotify()
|
const notify = useNotify()
|
||||||
const { bulkActionButtons, expand, className, playlistId, readOnly } = props
|
const { bulkActionButtons, expand, className, playlistId, readOnly } = props
|
||||||
const { data, ids, version } = controllerProps
|
const { data, ids, version, total } = controllerProps
|
||||||
|
|
||||||
|
if (total === 0) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
const anySong = data[ids[0]]
|
const anySong = data[ids[0]]
|
||||||
const showPlaceholder = !anySong || anySong.playlistId !== playlistId
|
const showPlaceholder = !anySong || anySong.playlistId !== playlistId
|
||||||
|
Loading…
x
Reference in New Issue
Block a user