From 5d45f57e00c0692ee80d9558a9b3713c682c0445 Mon Sep 17 00:00:00 2001 From: Albert Backenhof Date: Mon, 29 Apr 2019 10:15:01 +0200 Subject: [PATCH] Fixed master object bug -Previously the smart pivot didn't render as a master object. Issue: DEB-173 --- src/dataset.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dataset.js b/src/dataset.js index ea145cf..ac1b9c7 100644 --- a/src/dataset.js +++ b/src/dataset.js @@ -31,7 +31,13 @@ export async function initializeDataCube (component, layout) { } const app = qlik.currApp(component); - const hyperCubeDef = (await component.backendApi.getProperties()).qHyperCubeDef; + const properties = (await component.backendApi.getProperties()); + + // If this is a master object, fetch the hyperCubeDef of the original object + const hyperCubeDef = properties.qExtendsId + ? (await app.getObjectProperties(properties.qExtendsId)).properties.qHyperCubeDef + : properties.qHyperCubeDef; + return buildDataCube(hyperCubeDef, layout.qHyperCube.qDimensionInfo.length === 2, app); }