Skip to content

Commit

Permalink
fix: check for empty lable
Browse files Browse the repository at this point in the history
  • Loading branch information
vcellu committed Nov 16, 2022
1 parent 92036c9 commit 897dd67
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/SimpleGrid.tsx
Expand Up @@ -115,6 +115,7 @@ 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]
Expand All @@ -124,10 +125,13 @@ const SimpleGrid: React.FC<SimpleGridProps> = ({
props?.qHyperCubeDef?.qDimensions[
column.dataColIdx
].qDef.qFieldDefs[0];
column.display = props?.qHyperCubeDef?.qDimensions[
column.dataColIdx
].qDef.qFieldLabels[0];
const fieldLabel = props?.qHyperCubeDef?.qDimensions[
column.dataColIdx
].qDef.qFieldLabels[0];
column.display = fieldLabel.length === 0 ? column.label : fieldLabel;

}

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

0 comments on commit 897dd67

Please sign in to comment.