Better defaults to sort orders in List views

This commit is contained in:
Deluan
2020-06-09 07:45:23 -04:00
parent b54d4c75ae
commit 82d437f004
6 changed files with 24 additions and 13 deletions
+10 -3
View File
@@ -87,14 +87,21 @@ const SongList = (props) => {
{isDesktop && <AlbumLinkField source="album" />}
<TextField source="artist" />
{isDesktop && <NumberField source="trackNumber" />}
{isDesktop && <NumberField source="playCount" />}
{isDesktop && (
<FunctionField source="year" render={(r) => r.year || ''} />
<NumberField source="playCount" sortByOrder={'DESC'} />
)}
{isDesktop && (
<FunctionField
source="year"
render={(r) => r.year || ''}
sortByOrder={'DESC'}
/>
)}
<DurationField source="duration" />
<SongContextMenu
source={'starred'}
sortBy={'starred DESC, starredAt DESC'}
sortBy={'starred ASC, starredAt ASC'}
sortByOrder={'DESC'}
label={
<StarBorderIcon
fontSize={'small'}