From aa3643be28235ecc1501020ade57b1fcc203e2b8 Mon Sep 17 00:00:00 2001 From: novykh Date: Fri, 5 Jul 2024 13:48:41 +0300 Subject: [PATCH] v5.3.2 --- package.json | 2 +- src/components/table/index.js | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 8cf84631..d2948fcf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@netdata/charts", - "version": "5.3.1", + "version": "5.3.2", "description": "Netdata frontend SDK and chart utilities", "main": "dist/index.js", "module": "dist/es6/index.js", diff --git a/src/components/table/index.js b/src/components/table/index.js index c33c8ce9..cd0b6a5c 100644 --- a/src/components/table/index.js +++ b/src/components/table/index.js @@ -41,14 +41,16 @@ const useColumns = (chart, options = {}) => { return { id: `Context-${context}`, header: () => chart.intl(context), - columns: Object.keys(contextGroups[context]).map(dimension => - valueColumn(chart, { - context, - dimension, - dimensionId: contextGroups[context]?.[dimension]?.[0], - ...options, - }) - ), + columns: contextGroups[context] + ? Object.keys(contextGroups[context]).map(dimension => + valueColumn(chart, { + context, + dimension, + dimensionId: contextGroups[context]?.[dimension]?.[0], + ...options, + }) + ) + : [], labelProps: { textAlign: "center" }, notFlex: true, fullWidth: true,