Add filter by name to Playlist list
This commit is contained in:
@@ -5,11 +5,19 @@ import {
|
|||||||
BooleanField,
|
BooleanField,
|
||||||
NumberField,
|
NumberField,
|
||||||
DateField,
|
DateField,
|
||||||
|
Filter,
|
||||||
|
SearchInput,
|
||||||
} from 'react-admin'
|
} from 'react-admin'
|
||||||
import { DurationField, List } from '../common'
|
import { DurationField, List } from '../common'
|
||||||
|
|
||||||
|
const PlaylistFilter = (props) => (
|
||||||
|
<Filter {...props}>
|
||||||
|
<SearchInput source="name" alwaysOn />
|
||||||
|
</Filter>
|
||||||
|
)
|
||||||
|
|
||||||
const PlaylistList = (props) => (
|
const PlaylistList = (props) => (
|
||||||
<List {...props} exporter={false}>
|
<List {...props} exporter={false} filters={<PlaylistFilter />}>
|
||||||
<Datagrid rowClick="show">
|
<Datagrid rowClick="show">
|
||||||
<TextField source="name" />
|
<TextField source="name" />
|
||||||
<TextField source="owner" />
|
<TextField source="owner" />
|
||||||
|
|||||||
Reference in New Issue
Block a user