mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 23:09: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,20 +1,17 @@
|
|||
import { CellProps, Column } from 'react-table';
|
||||
import { columnHelper } from './helper';
|
||||
|
||||
import { Service } from '../../types';
|
||||
|
||||
export const clusterIP: Column<Service> = {
|
||||
Header: 'Cluster IP',
|
||||
accessor: 'ClusterIPs',
|
||||
export const clusterIP = columnHelper.accessor('ClusterIPs', {
|
||||
header: 'Cluster IP',
|
||||
id: 'clusterIP',
|
||||
Cell: ({ value: clusterIPs }: CellProps<Service, Service['ClusterIPs']>) => {
|
||||
cell: ({ getValue }) => {
|
||||
const clusterIPs = getValue();
|
||||
|
||||
if (!clusterIPs?.length) {
|
||||
return '-';
|
||||
}
|
||||
return clusterIPs.map((ip) => <div key={ip}>{ip}</div>);
|
||||
},
|
||||
disableFilters: true,
|
||||
canHide: true,
|
||||
sortType: (rowA, rowB) => {
|
||||
sortingFn: (rowA, rowB) => {
|
||||
const a = rowA.original.ClusterIPs;
|
||||
const b = rowB.original.ClusterIPs;
|
||||
|
||||
|
@ -38,4 +35,4 @@ export const clusterIP: Column<Service> = {
|
|||
}
|
||||
);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue