quintodrome/ui/src/artist/ArtistList.js

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

34 lines
674 B
JavaScript
Raw Normal View History

import React from 'react'
import {
Datagrid,
Filter,
NumberField,
SearchInput,
TextField,
} from 'react-admin'
2020-05-15 06:20:11 -08:00
import { artistLink, List } from '../common'
const ArtistFilter = (props) => (
<Filter {...props}>
<SearchInput source="name" alwaysOn />
</Filter>
)
const ArtistList = (props) => (
<List
{...props}
2020-04-24 13:37:28 -08:00
sort={{ field: 'name', order: 'ASC' }}
exporter={false}
bulkActionButtons={false}
filters={<ArtistFilter />}
>
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