feat(reports): request full breakdown for active dim via wildcard
When the active bar dimension's own filter is unselected, the viewer sends payee=*/tags=* so bars show the whole distribution; explicit selections still slice normally.
This commit is contained in:
@@ -93,10 +93,14 @@ export function ReportViewer({ id, version, fields, onClose, onRegenerated }: Re
|
||||
const p: Record<string, any> = { flow };
|
||||
if (granularity) p.granularity = [granularity];
|
||||
if (selectedPeriods.length) p.period_ids = selectedPeriods;
|
||||
// The active breakdown dim requests every cube value ("*") when its own
|
||||
// filter is unselected, so bars show the full distribution.
|
||||
if (selectedPayees.length) p.payee = selectedPayees;
|
||||
else if (dim === "payee") p.payee = ["*"];
|
||||
if (selectedTags.length) p.tags = selectedTags;
|
||||
else if (dim === "tag") p.tags = ["*"];
|
||||
return p;
|
||||
}, [granularity, flow, selectedPeriods, selectedPayees, selectedTags]);
|
||||
}, [granularity, flow, dim, selectedPeriods, selectedPayees, selectedTags]);
|
||||
|
||||
useEffect(() => {
|
||||
let mounted = true;
|
||||
|
||||
Reference in New Issue
Block a user