quintodrome/ui/src/playlist/PlaylistList.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
768 B
JavaScript
Raw Normal View History

2020-05-05 14:28:55 -08:00
import React from 'react'
2020-05-08 06:47:06 -08:00
import {
Datagrid,
TextField,
BooleanField,
2020-05-10 15:59:47 -08:00
NumberField,
2020-05-08 06:47:06 -08:00
DateField,
2020-05-16 15:14:19 -08:00
Filter,
SearchInput,
2020-05-18 06:47:12 -08:00
EditButton,
2020-05-08 06:47:06 -08:00
} from 'react-admin'
2020-05-11 17:27:00 -08:00
import { DurationField, List } from '../common'
2020-05-05 14:28:55 -08:00
2020-05-16 15:14:19 -08:00
const PlaylistFilter = (props) => (
<Filter {...props}>
<SearchInput source="name" alwaysOn />
</Filter>
)
2020-05-05 14:28:55 -08:00
const PlaylistList = (props) => (
2020-05-16 15:14:19 -08:00
<List {...props} exporter={false} filters={<PlaylistFilter />}>
2020-05-15 09:48:33 -08:00
<Datagrid rowClick="show">
2020-05-08 06:47:06 -08:00
<TextField source="name" />
<TextField source="owner" />
<BooleanField source="public" />
2020-05-10 15:59:47 -08:00
<NumberField source="songCount" />
2020-05-08 06:47:06 -08:00
<DurationField source="duration" />
<DateField source="updatedAt" />
2020-05-18 06:47:12 -08:00
<EditButton />
2020-05-05 14:28:55 -08:00
</Datagrid>
</List>
)
export default PlaylistList