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,6 +55,9 @@ export const columns = (
|
|||
cell: ({row}) => {
|
||||
const category = categories.find((category) => category.id === row.original.categoryId);
|
||||
return (
|
||||
<>
|
||||
{
|
||||
category && (
|
||||
<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">
|
||||
|
@ -62,6 +65,9 @@ export const columns = (
|
|||
</svg>
|
||||
<p>{category?.name ?? '-'}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</>
|
||||
);
|
||||
},
|
||||
size: 200,
|
||||
|
|
Loading…
Add table
Reference in a new issue