From c126c21baa217c9cdce55819acb6d3483f9cd572 Mon Sep 17 00:00:00 2001 From: Kevin Mingtarja Date: Thu, 4 Jan 2024 01:51:56 +0700 Subject: [PATCH] Fix DataTableProps['data'] for resultType string Signed-off-by: Kevin Mingtarja --- web/ui/react-app/src/pages/graph/DataTable.test.tsx | 4 ++-- web/ui/react-app/src/pages/graph/DataTable.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/ui/react-app/src/pages/graph/DataTable.test.tsx b/web/ui/react-app/src/pages/graph/DataTable.test.tsx index d6974cf90..1252b5bfc 100755 --- a/web/ui/react-app/src/pages/graph/DataTable.test.tsx +++ b/web/ui/react-app/src/pages/graph/DataTable.test.tsx @@ -338,7 +338,7 @@ describe('DataTable', () => { const dataTableProps: DataTableProps = { data: { resultType: 'string', - result: 'string', + result: [1572098246.599, 'test'], }, useLocalTime: false, }; @@ -346,7 +346,7 @@ describe('DataTable', () => { it('renders a string row', () => { const table = dataTable.find(Table); const rows = table.find('tr'); - expect(rows.text()).toEqual('stringt'); + expect(rows.text()).toEqual('stringtest'); }); }); }); diff --git a/web/ui/react-app/src/pages/graph/DataTable.tsx b/web/ui/react-app/src/pages/graph/DataTable.tsx index 901d7bb48..1885c7a80 100644 --- a/web/ui/react-app/src/pages/graph/DataTable.tsx +++ b/web/ui/react-app/src/pages/graph/DataTable.tsx @@ -24,7 +24,7 @@ export interface DataTableProps { } | { resultType: 'string'; - result: string; + result: SampleValue; }; useLocalTime: boolean; }