mirror of https://github.com/portainer/portainer
23 lines
472 B
TypeScript
23 lines
472 B
TypeScript
import { Column } from 'react-table';
|
|
|
|
import { Environment } from '@/portainer/environments/types';
|
|
|
|
import { DefaultFilter } from '@@/datatables/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;
|
|
}
|