import { CellProps, Column, Row } from 'react-table'; import { filterHOC } from '@/react/components/datatables/Filter'; import { Link } from '@@/Link'; import { Ingress } from '../../types'; export const namespace: Column = { Header: 'Namespace', accessor: 'Namespace', Cell: ({ row }: CellProps) => ( {row.original.Namespace} ), id: 'namespace', disableFilters: false, canHide: true, Filter: filterHOC('Filter by namespace'), filter: (rows: Row[], filterValue, filters) => { if (filters.length === 0) { return rows; } return rows.filter((r) => filters.includes(r.original.Namespace)); }, };