Make Playlist's songCount sortable
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
|||||||
Datagrid,
|
Datagrid,
|
||||||
TextField,
|
TextField,
|
||||||
BooleanField,
|
BooleanField,
|
||||||
FunctionField,
|
NumberField,
|
||||||
DateField,
|
DateField,
|
||||||
} from 'react-admin'
|
} from 'react-admin'
|
||||||
import { DurationField, Title } from '../common'
|
import { DurationField, Title } from '../common'
|
||||||
@@ -21,11 +21,7 @@ const PlaylistList = (props) => (
|
|||||||
<TextField source="name" />
|
<TextField source="name" />
|
||||||
<TextField source="owner" />
|
<TextField source="owner" />
|
||||||
<BooleanField source="public" />
|
<BooleanField source="public" />
|
||||||
<FunctionField
|
<NumberField source="songCount" />
|
||||||
sortable={false} // TODO Make playlist.songCount sortable
|
|
||||||
source="songCount"
|
|
||||||
render={(r) => r.tracks && r.tracks.length}
|
|
||||||
/>
|
|
||||||
<DurationField source="duration" />
|
<DurationField source="duration" />
|
||||||
<DateField source="updatedAt" />
|
<DateField source="updatedAt" />
|
||||||
</Datagrid>
|
</Datagrid>
|
||||||
|
|||||||
Reference in New Issue
Block a user