diff --git a/frontend/src/component/changeRequest/ChangeRequests/ChangeRequests.tsx b/frontend/src/component/changeRequest/ChangeRequests/ChangeRequests.tsx index b7edde2f29..6c5a884227 100644 --- a/frontend/src/component/changeRequest/ChangeRequests/ChangeRequests.tsx +++ b/frontend/src/component/changeRequest/ChangeRequests/ChangeRequests.tsx @@ -102,14 +102,12 @@ const ChangeRequestsInner = () => { const columns = useMemo( () => [ - { + columnHelper.accessor('id', { id: 'Title', header: 'Title', meta: { width: '300px' }, - cell: ({ row }) => ( - - ), - }, + cell: GlobalChangeRequestTitleCell, + }), columnHelper.accessor('features', { id: 'Updated feature flags', header: 'Updated feature flags', diff --git a/frontend/src/component/changeRequest/ChangeRequests/GlobalChangeRequestTitleCell.tsx b/frontend/src/component/changeRequest/ChangeRequests/GlobalChangeRequestTitleCell.tsx index a511040609..af356ded93 100644 --- a/frontend/src/component/changeRequest/ChangeRequests/GlobalChangeRequestTitleCell.tsx +++ b/frontend/src/component/changeRequest/ChangeRequests/GlobalChangeRequestTitleCell.tsx @@ -4,6 +4,7 @@ import { Link as RouterLink, type LinkProps } from 'react-router-dom'; import { useProjectOverviewNameOrId } from 'hooks/api/getters/useProjectOverview/useProjectOverview'; import { Truncator } from 'component/common/Truncator/Truncator'; import type { ChangeRequestSearchItemSchema } from 'openapi'; +import type { Row } from '@tanstack/react-table'; const LinkContainer = styled('div')(({ theme }) => ({ color: theme.palette.text.secondary, @@ -34,13 +35,21 @@ const UpdateText = styled(Typography)(({ theme }) => ({ fontSize: theme.typography.body2.fontSize, })); +type GlobalChangeRequestTitleCellProps = { + row: Row; +}; + export const GlobalChangeRequestTitleCell = ({ - id, - title, - project, - features: featureChanges, - segments: segmentChanges, -}: ChangeRequestSearchItemSchema) => { + row: { + original: { + id, + title, + project, + features: featureChanges, + segments: segmentChanges, + }, + }, +}: GlobalChangeRequestTitleCellProps) => { const projectName = useProjectOverviewNameOrId(project); const totalChanges = featureChanges?.length ?? 0 + segmentChanges?.length ?? 0;