From f8bf6b5cc8bda6c89a387073e6af9f530ed44737 Mon Sep 17 00:00:00 2001 From: Proddy Date: Thu, 26 May 2022 17:49:25 +0200 Subject: [PATCH] fix isCmdOnly() function for commands like reset --- interface/src/project/DashboardData.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/interface/src/project/DashboardData.tsx b/interface/src/project/DashboardData.tsx index 5b4bd827d..5d8ae278c 100644 --- a/interface/src/project/DashboardData.tsx +++ b/interface/src/project/DashboardData.tsx @@ -384,7 +384,10 @@ const DashboardData: FC = () => { const handleDownloadCsv = () => { const columns = [ { accessor: (dv: any) => dv.id.slice(2), name: 'Entity' }, - { accessor: (dv: any) => (typeof dv.v === 'number') ? new Intl.NumberFormat().format(dv.v) : dv.v, name: 'Value' }, + { + accessor: (dv: any) => (typeof dv.v === 'number' ? new Intl.NumberFormat().format(dv.v) : dv.v), + name: 'Value' + }, { accessor: (dv: any) => DeviceValueUOM_s[dv.u], name: 'UoM' } ]; downloadAsCsv( @@ -449,7 +452,7 @@ const DashboardData: FC = () => { } }; - const isCmdOnly = (dv: DeviceValue) => dv.v === undefined && dv.c; + const isCmdOnly = (dv: DeviceValue) => dv.v === '' && dv.c; function formatValue(value: any, uom: number) { if (value === undefined) {