Skip to content

Commit

Permalink
fix: master items
Browse files Browse the repository at this point in the history
  • Loading branch information
vcellu committed Nov 16, 2022
1 parent 5a18d38 commit 560bccb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/SimpleGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,24 @@ const SimpleGrid: React.FC<SimpleGridProps> = ({
async (column: any) => {
try {
const props = await model.getEffectiveProperties();
console.log(props, column);
if (
props?.qHyperCubeDef?.qDimensions[column.dataColIdx].qDef
.qFieldDefs[0]
.qFieldDefs?.[0]
) {
column.qCardinal = layout.qHyperCube.qDimensionInfo[column.dataColIdx].qCardinal;
column.label =
props?.qHyperCubeDef?.qDimensions[
column.dataColIdx
].qDef.qFieldDefs[0];
].qDef.qFieldDefs?.[0];
const fieldLabel = props?.qHyperCubeDef?.qDimensions[
column.dataColIdx
].qDef.qFieldLabels[0];
].qDef.qFieldLabels?.[0];
console.log(fieldLabel);
column.display = fieldLabel.length === 0 ? column.label : fieldLabel;

console.log(column);
} else {
column.label = layout.qHyperCube.qDimensionInfo[column.dataColIdx].title;
column.display = layout.qHyperCube.qDimensionInfo[column.dataColIdx].qFallbackTitle;
}

searchColumn({ searching: true, column });
Expand Down

0 comments on commit 560bccb

Please sign in to comment.