fix(images): sort by tags [EE-6410] (#10740)

pull/10761/head
Chaim Lev-Ari 2023-12-04 08:47:28 +02:00 committed by GitHub
parent 2a18c9f215
commit 8ee0c0cf27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -4,14 +4,16 @@ import { ImagesListResponse } from '@/react/docker/images/queries/useImages';
import { columnHelper } from './helper';
export const tags = columnHelper.accessor('tags', {
export const tags = columnHelper.accessor((item) => item.tags.join(','), {
id: 'tags',
header: 'Tags',
cell: Cell,
});
function Cell({ getValue }: CellContext<ImagesListResponse, string[]>) {
const repoTags = getValue();
function Cell({
row: { original: item },
}: CellContext<ImagesListResponse, unknown>) {
const repoTags = item.tags;
return (
<>