mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add Tag column filter
This commit is contained in:
parent
d60e503035
commit
ed4ef673a3
1 changed files with 7 additions and 0 deletions
|
|
@ -129,6 +129,13 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
|
|||
sorter={(a, b) => arraySorter(a.tagIds, b.tagIds, tags)}
|
||||
width={275}
|
||||
className={styles.nogrow}
|
||||
filters={tags.map(t => ({
|
||||
text: <Tag title={t.description}>{t.name}</Tag>,
|
||||
value: t.id.toString()
|
||||
}))}
|
||||
onFilter={(value, record) => record.tagIds
|
||||
? record.tagIds.includes(+value)
|
||||
: false}
|
||||
render={(tagIds: number[]) =>
|
||||
tagIds
|
||||
? <TagCloud tags={tags.filter((t: TagInterface) => tagIds.includes(t.id))} />
|
||||
|
|
|
|||
Loading…
Reference in a new issue