1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

fix(more resources): fix porting and functionality [r8s-103] (#8)

Co-authored-by: testA113 <aliharriss1995@gmail.com>
Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io>
Co-authored-by: Ali <83188384+testA113@users.noreply.github.com>
This commit is contained in:
Yajith Dayarathna 2024-11-12 09:55:30 +13:00 committed by GitHub
parent e6577ca269
commit 6d31f4876a
48 changed files with 894 additions and 186 deletions

View file

@ -1,5 +1,5 @@
import { createColumnHelper } from '@tanstack/react-table';
import { Role } from '../types';
import { RoleRowData } from '../types';
export const columnHelper = createColumnHelper<Role>();
export const columnHelper = createColumnHelper<RoleRowData>();

View file

@ -3,7 +3,7 @@ import { Row } from '@tanstack/react-table';
import { filterHOC } from '@@/datatables/Filter';
import { Link } from '@@/Link';
import { Role } from '../types';
import { RoleRowData } from '../types';
import { columnHelper } from './helper';
@ -26,7 +26,7 @@ export const namespace = columnHelper.accessor((row) => row.namespace, {
filter: filterHOC('Filter by namespace'),
},
enableColumnFilter: true,
filterFn: (row: Row<Role>, _columnId: string, filterValue: string[]) =>
filterFn: (row: Row<RoleRowData>, _columnId: string, filterValue: string[]) =>
filterValue.length === 0 ||
filterValue.includes(row.original.namespace ?? ''),
});