1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-11-10 01:19:53 +01:00

chore: disable "sortable" column headers for change requests table (#10936)

Makes all columns in the change requests table unsortable. The API
doesn't support sorting yet and it's not entirely clear that we want it
at the moment. As such, make it so that the column headers aren't
interactable to make it less misleading.
This commit is contained in:
Thomas Heartman 2025-11-07 09:48:05 +01:00 committed by GitHub
parent ee6a346ca7
commit 2feb921a26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,6 +85,7 @@ const ChangeRequestsInner = ({ user }: { user: IUser }) => {
header: 'Title', header: 'Title',
meta: { width: '35%' }, meta: { width: '35%' },
cell: GlobalChangeRequestTitleCell, cell: GlobalChangeRequestTitleCell,
enableSorting: false,
}), }),
columnHelper.accessor('features', { columnHelper.accessor('features', {
header: 'Updated feature flags', header: 'Updated feature flags',
@ -117,11 +118,13 @@ const ChangeRequestsInner = ({ user }: { user: IUser }) => {
columnHelper.accessor('createdAt', { columnHelper.accessor('createdAt', {
header: 'Submitted', header: 'Submitted',
meta: { width: '5%' }, meta: { width: '5%' },
enableSorting: false,
cell: ({ getValue }) => <TimeAgoCell value={getValue()} />, cell: ({ getValue }) => <TimeAgoCell value={getValue()} />,
}), }),
columnHelper.accessor('environment', { columnHelper.accessor('environment', {
header: 'Environment', header: 'Environment',
meta: { width: '10%' }, meta: { width: '10%' },
enableSorting: false,
cell: ({ getValue }) => ( cell: ({ getValue }) => (
<HighlightCell maxTitleLines={1} value={getValue()} /> <HighlightCell maxTitleLines={1} value={getValue()} />
), ),
@ -129,6 +132,7 @@ const ChangeRequestsInner = ({ user }: { user: IUser }) => {
columnHelper.accessor('state', { columnHelper.accessor('state', {
header: 'Status', header: 'Status',
meta: { width: '10%' }, meta: { width: '10%' },
enableSorting: false,
cell: ({ getValue, row }) => ( cell: ({ getValue, row }) => (
<ChangeRequestStatusCell value={getValue()} row={row} /> <ChangeRequestStatusCell value={getValue()} row={row} />
), ),