From e7fed714eee4df590cc1a3e90a0f419d6a9ac472 Mon Sep 17 00:00:00 2001 From: goodm2ice Date: Mon, 13 Dec 2021 11:05:49 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D1=87=D0=B8=D1=81=D0=B5=D0=BB=20=D0=B2=20?= =?UTF-8?q?makeNumericRender?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Table/index.tsx b/src/components/Table/index.tsx index 9fb2115..54fa121 100644 --- a/src/components/Table/index.tsx +++ b/src/components/Table/index.tsx @@ -13,7 +13,7 @@ export const formatDate='YYYY.MM.DD HH:mm' export const makeNumericRender = (fixed?: number) => (value: any, row: object): ReactNode => { let val = '-' - if (value && Number.isFinite(+value)) { + if ((value ?? null) !== null && Number.isFinite(+value)) { val = !!fixed ? (+value).toFixed(fixed) : (+value).toPrecision(5)