From 47fd403761d062ca6ea4eaf614401fcd5e163536 Mon Sep 17 00:00:00 2001 From: mufazalov Date: Mon, 10 Jul 2023 13:23:38 +0300 Subject: [PATCH] fix(TableIndexInfo): format DataSize --- src/components/InfoViewer/formatters/schema.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/InfoViewer/formatters/schema.ts b/src/components/InfoViewer/formatters/schema.ts index d19241b8f..cc00dfc86 100644 --- a/src/components/InfoViewer/formatters/schema.ts +++ b/src/components/InfoViewer/formatters/schema.ts @@ -1,4 +1,5 @@ -import {TIndexDescription} from '../../../types/api/schema'; +import type {TIndexDescription} from '../../../types/api/schema'; +import {toFormattedSize} from '../../FormattedBytes/utils'; import {createInfoFormatter} from '../utils'; @@ -8,6 +9,7 @@ export const formatTableIndexItem = createInfoFormatter({ State: (value) => value?.substring(11), // trims EIndexState prefix KeyColumnNames: (value) => value?.join(', '), DataColumnNames: (value) => value?.join(', '), + DataSize: toFormattedSize, }, labels: { KeyColumnNames: 'Columns',