Use a custom List component
This commit is contained in:
@@ -2,12 +2,11 @@ import React from 'react'
|
||||
import {
|
||||
Datagrid,
|
||||
Filter,
|
||||
List,
|
||||
NumberField,
|
||||
SearchInput,
|
||||
TextField,
|
||||
} from 'react-admin'
|
||||
import { artistLink, Pagination, Title } from '../common'
|
||||
import { artistLink, List } from '../common'
|
||||
|
||||
const ArtistFilter = (props) => (
|
||||
<Filter {...props}>
|
||||
@@ -18,15 +17,10 @@ const ArtistFilter = (props) => (
|
||||
const ArtistList = (props) => (
|
||||
<List
|
||||
{...props}
|
||||
title={
|
||||
<Title subTitle={'resources.artist.name'} args={{ smart_count: 2 }} />
|
||||
}
|
||||
sort={{ field: 'name', order: 'ASC' }}
|
||||
exporter={false}
|
||||
bulkActionButtons={false}
|
||||
filters={<ArtistFilter />}
|
||||
perPage={15}
|
||||
pagination={<Pagination />}
|
||||
>
|
||||
<Datagrid rowClick={artistLink}>
|
||||
<TextField source="name" />
|
||||
|
||||
Reference in New Issue
Block a user