fix(Connections): disable grouping for time&speed (#160)

This commit is contained in:
nb5p 2023-09-06 20:40:41 +08:00 committed by GitHub
parent 5c09183b6f
commit 8398dff02d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,6 +193,7 @@ export default () => {
}, },
{ {
header: () => t('connectTime'), header: () => t('connectTime'),
enableGrouping: false,
accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.ConnectTime, accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.ConnectTime,
accessorFn: (row) => formatTimeFromNow(row.start), accessorFn: (row) => formatTimeFromNow(row.start),
sortingFn: (prev, next) => sortingFn: (prev, next) =>
@ -201,6 +202,7 @@ export default () => {
}, },
{ {
header: () => t('dlSpeed'), header: () => t('dlSpeed'),
enableGrouping: false,
accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.DlSpeed, accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.DlSpeed,
accessorFn: (row) => `${byteSize(row.downloadSpeed)}/s`, accessorFn: (row) => `${byteSize(row.downloadSpeed)}/s`,
sortingFn: (prev, next) => sortingFn: (prev, next) =>
@ -208,6 +210,7 @@ export default () => {
}, },
{ {
header: () => t('ulSpeed'), header: () => t('ulSpeed'),
enableGrouping: false,
accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.ULSpeed, accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.ULSpeed,
accessorFn: (row) => `${byteSize(row.uploadSpeed)}/s`, accessorFn: (row) => `${byteSize(row.uploadSpeed)}/s`,
sortingFn: (prev, next) => sortingFn: (prev, next) =>
@ -215,6 +218,7 @@ export default () => {
}, },
{ {
header: () => t('dl'), header: () => t('dl'),
enableGrouping: false,
accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.Download, accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.Download,
accessorFn: (row) => byteSize(row.download), accessorFn: (row) => byteSize(row.download),
sortingFn: (prev, next) => sortingFn: (prev, next) =>
@ -222,6 +226,7 @@ export default () => {
}, },
{ {
header: () => t('ul'), header: () => t('ul'),
enableGrouping: false,
accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.Upload, accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.Upload,
accessorFn: (row) => byteSize(row.upload), accessorFn: (row) => byteSize(row.upload),
sortingFn: (prev, next) => prev.original.upload - next.original.upload, sortingFn: (prev, next) => prev.original.upload - next.original.upload,