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