1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

fix(edge groups): make large edge groups editable [BE-11720] (#558)

This commit is contained in:
Viktor Pettersson 2025-03-28 15:16:05 +01:00 committed by GitHub
parent 7c01f84a5c
commit 1d12011eb5
14 changed files with 373 additions and 46 deletions

View file

@ -0,0 +1,30 @@
import { createColumnHelper } from '@tanstack/react-table';
import { truncate } from 'lodash';
import { Environment } from '@/react/portainer/environments/types';
export type DecoratedEnvironment = Environment & {
Tags: string[];
Group: string;
};
const columHelper = createColumnHelper<DecoratedEnvironment>();
export const columns = [
columHelper.accessor('Name', {
header: 'Name',
id: 'Name',
cell: ({ getValue }) => truncate(getValue(), { length: 64 }),
}),
columHelper.accessor('Group', {
header: 'Group',
id: 'Group',
cell: ({ getValue }) => truncate(getValue(), { length: 64 }),
}),
columHelper.accessor((row) => row.Tags.join(','), {
header: 'Tags',
id: 'tags',
enableSorting: false,
cell: ({ getValue }) => truncate(getValue(), { length: 64 }),
}),
];