Skip to content

Commit

Permalink
feat: dimension labels in selection bar (#1617)
Browse files Browse the repository at this point in the history
Show user-created labels from
master dimensions as labels in
the Nebula  selection bar, when
available.
  • Loading branch information
Bjornwa authored Sep 25, 2024
1 parent 4a9417a commit 73ea8f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apis/nucleus/src/components/selections/OneField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export default function OneField({
};

const selection = field.selections[stateIx];
const fieldLabel =
selection.qDimensionReferences?.find((element) => element.qLabel)?.qLabel ||
selection.qReadableName ||
selection.qField;
if (typeof selection.qTotal === 'undefined') {
selection.qTotal = 0;
}
Expand Down Expand Up @@ -83,7 +87,7 @@ export default function OneField({
Header = (
<Grid item xs style={{ minWidth: 0, flexGrow: 1, opacity: selection.qLocked ? '0.3' : '' }}>
<Typography noWrap style={{ fontSize: '12px', lineHeight: '16px', fontWeight: 600 }}>
{selection.qField}
{fieldLabel}
</Typography>
<Typography noWrap style={{ fontSize: '12px', opacity: 0.55, lineHeight: '16px' }}>
{label}
Expand Down

0 comments on commit 73ea8f4

Please sign in to comment.