mirror of https://github.com/portainer/portainer
22 lines
502 B
TypeScript
22 lines
502 B
TypeScript
|
import { Column } from 'react-table';
|
||
|
|
||
|
import { Environment } from '@/portainer/environments/types';
|
||
|
import { DefaultFilter } from '@/portainer/components/datatables/components/Filter';
|
||
|
|
||
|
import { useRowContext } from './RowContext';
|
||
|
|
||
|
export const group: Column<Environment> = {
|
||
|
Header: 'Group',
|
||
|
accessor: (row) => row.GroupId,
|
||
|
Cell: GroupCell,
|
||
|
id: 'groupName',
|
||
|
Filter: DefaultFilter,
|
||
|
canHide: true,
|
||
|
};
|
||
|
|
||
|
function GroupCell() {
|
||
|
const { groupName } = useRowContext();
|
||
|
|
||
|
return groupName;
|
||
|
}
|