N-FIN-49: show clear column if no category selected
This commit is contained in:
parent
50b8ba399d
commit
d5c4f02871
1 changed files with 13 additions and 7 deletions
|
@ -55,13 +55,19 @@ export const columns = (
|
||||||
cell: ({row}) => {
|
cell: ({row}) => {
|
||||||
const category = categories.find((category) => category.id === row.original.categoryId);
|
const category = categories.find((category) => category.id === row.original.categoryId);
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center space-x-4">
|
<>
|
||||||
<svg className="h-5" fill={category?.color} viewBox="0 0 20 20"
|
{
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
category && (
|
||||||
<circle cx="10" cy="10" r="10"/>
|
<div className="flex items-center space-x-4">
|
||||||
</svg>
|
<svg className="h-5" fill={category?.color} viewBox="0 0 20 20"
|
||||||
<p>{category?.name ?? '-'}</p>
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
</div>
|
<circle cx="10" cy="10" r="10"/>
|
||||||
|
</svg>
|
||||||
|
<p>{category?.name ?? '-'}</p>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
size: 200,
|
size: 200,
|
||||||
|
|
Loading…
Add table
Reference in a new issue