mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
chore(deps): upgrade react-table to v8 [EE-4837] (#8245)
This commit is contained in:
parent
f20d3e72b9
commit
757461d58b
140 changed files with 1805 additions and 2872 deletions
|
@ -1,24 +1,26 @@
|
|||
import { CellProps, Column } from 'react-table';
|
||||
import { CellContext } from '@tanstack/react-table';
|
||||
|
||||
import { Badge } from '@@/Badge';
|
||||
|
||||
import type { IngressControllerClassMap } from '../../types';
|
||||
|
||||
export const name: Column<IngressControllerClassMap> = {
|
||||
Header: 'Ingress class',
|
||||
accessor: 'ClassName',
|
||||
Cell: NameCell,
|
||||
id: 'name',
|
||||
disableFilters: true,
|
||||
canHide: true,
|
||||
Filter: () => null,
|
||||
sortType: 'string',
|
||||
};
|
||||
import { columnHelper } from './helper';
|
||||
|
||||
export const name = columnHelper.accessor('ClassName', {
|
||||
header: 'Ingress class',
|
||||
cell: NameCell,
|
||||
id: 'name',
|
||||
});
|
||||
|
||||
function NameCell({
|
||||
row,
|
||||
getValue,
|
||||
}: CellContext<IngressControllerClassMap, string>) {
|
||||
const className = getValue();
|
||||
|
||||
function NameCell({ row }: CellProps<IngressControllerClassMap>) {
|
||||
return (
|
||||
<span className="flex flex-nowrap">
|
||||
{row.original.ClassName}
|
||||
{className}
|
||||
{row.original.New && <Badge className="ml-1">Newly detected</Badge>}
|
||||
</span>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue