quintodrome/ui/src/artist/ArtistList.js

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

40 lines
839 B
JavaScript
Raw Normal View History

import React from 'react'
import {
Datagrid,
Filter,
List,
NumberField,
SearchInput,
TextField,
} from 'react-admin'
2020-05-14 16:42:21 -08:00
import { artistLink, Pagination, Title } from '../common'
const ArtistFilter = (props) => (
<Filter {...props}>
<SearchInput source="name" alwaysOn />
</Filter>
)
const ArtistList = (props) => (
<List
{...props}
2020-04-27 19:22:17 -08:00
title={
<Title subTitle={'resources.artist.name'} args={{ smart_count: 2 }} />
}
2020-04-24 13:37:28 -08:00
sort={{ field: 'name', order: 'ASC' }}
exporter={false}
bulkActionButtons={false}
filters={<ArtistFilter />}
2020-02-05 09:28:39 -09:00
perPage={15}
pagination={<Pagination />}
>
2020-05-14 16:42:21 -08:00
<Datagrid rowClick={artistLink}>
2020-04-24 13:37:28 -08:00
<TextField source="name" />
<NumberField source="albumCount" />
2020-05-08 05:50:33 -08:00
<NumberField source="songCount" />
</Datagrid>
</List>
)
export default ArtistList