Skip to content

Commit 73ea8f4

Browse files
authored
feat: dimension labels in selection bar (#1617)
Show user-created labels from master dimensions as labels in the Nebula selection bar, when available.
1 parent 4a9417a commit 73ea8f4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apis/nucleus/src/components/selections/OneField.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ export default function OneField({
3636
};
3737

3838
const selection = field.selections[stateIx];
39+
const fieldLabel =
40+
selection.qDimensionReferences?.find((element) => element.qLabel)?.qLabel ||
41+
selection.qReadableName ||
42+
selection.qField;
3943
if (typeof selection.qTotal === 'undefined') {
4044
selection.qTotal = 0;
4145
}
@@ -83,7 +87,7 @@ export default function OneField({
8387
Header = (
8488
<Grid item xs style={{ minWidth: 0, flexGrow: 1, opacity: selection.qLocked ? '0.3' : '' }}>
8589
<Typography noWrap style={{ fontSize: '12px', lineHeight: '16px', fontWeight: 600 }}>
86-
{selection.qField}
90+
{fieldLabel}
8791
</Typography>
8892
<Typography noWrap style={{ fontSize: '12px', opacity: 0.55, lineHeight: '16px' }}>
8993
{label}

0 commit comments

Comments
 (0)