Skip to content

Commit

Permalink
fix: passdown cardinal of dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
vcellu committed Nov 13, 2022
1 parent bbd0258 commit 4376b78
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/SimpleGrid.tsx
Expand Up @@ -30,6 +30,7 @@ export type SimpleGridProps = {
qHyperCube: {
qGrandTotalRow: number;
qSize: number;
qDimensionInfo: Array<any>;
};
};
name: string;
Expand Down Expand Up @@ -114,11 +115,11 @@ const SimpleGrid: React.FC<SimpleGridProps> = ({
async (column: any) => {
try {
const props = await model.getEffectiveProperties();

if (
props?.qHyperCubeDef?.qDimensions[column.dataColIdx].qDef
.qFieldDefs[0]
) {
column.qCardinal = layout.qHyperCube.qDimensionInfo[column.dataColIdx].qCardinal;
column.label =
props?.qHyperCubeDef?.qDimensions[
column.dataColIdx
Expand All @@ -127,7 +128,7 @@ const SimpleGrid: React.FC<SimpleGridProps> = ({
searchColumn({ searching: true, column });
} catch (error) {}
},
[model, searchColumn]
[model, searchColumn, layout]
);

const onSearchColumn = useCallback(
Expand Down

0 comments on commit 4376b78

Please sign in to comment.