Use order fields to sort by artist and album
This commit is contained in:
@@ -29,10 +29,11 @@ const AlbumListView = ({ hasShow, hasEdit, hasList, ...rest }) => {
|
||||
const isDesktop = useMediaQuery((theme) => theme.breakpoints.up('md'))
|
||||
return (
|
||||
<Datagrid expand={<AlbumDetails />} rowClick={'show'} {...rest}>
|
||||
<TextField source="name" />
|
||||
<TextField source="name" sortBy={'orderAlbumName'} />
|
||||
<FunctionField
|
||||
source="artist"
|
||||
render={(r) => (r.albumArtist ? r.albumArtist : r.artist)}
|
||||
sortBy={'orderAlbumArtistName'}
|
||||
/>
|
||||
{isDesktop && <NumberField source="songCount" />}
|
||||
{isDesktop && <NumberField source="playCount" />}
|
||||
|
||||
Reference in New Issue
Block a user