diff --git a/jest/setup.js b/jest/setup.js index df901f6c1..be909b114 100644 --- a/jest/setup.js +++ b/jest/setup.js @@ -1 +1,12 @@ import "jest-canvas-mock" + +Element.prototype.getBoundingClientRect = jest.fn(() => { + return { + width: 120, + height: 120, + top: 0, + left: 0, + bottom: 0, + right: 0, + } +}) diff --git a/package.json b/package.json index 2e6043c8f..8cf846317 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@netdata/charts", - "version": "5.3.0", + "version": "5.3.1", "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 609f38148..c33c8ce91 100644 --- a/src/components/table/index.js +++ b/src/components/table/index.js @@ -16,7 +16,7 @@ const keepoutRegex = ".*" const keepRegex = "(" + keepoutRegex + ")" const sortContexts = (contexts, contextScope) => - isEmpty(difference(contexts, contextScope)) ? contexts : contextScope + isEmpty(difference(contexts, contextScope)) ? contextScope : contexts const useColumns = (chart, options = {}) => { const contextScope = useAttributeValue("contextScope")