diff --git a/ui/src/views/Forecast.jsx b/ui/src/views/Forecast.jsx index f25f293..34305d5 100644 --- a/ui/src/views/Forecast.jsx +++ b/ui/src/views/Forecast.jsx @@ -1307,7 +1307,7 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio // changes a larger set. It travels as [col, op, value] rather than folded // into the slices, because a slice is {col: value} and can only mean // equality: a view filtered to sseas_e <= 2027 has no slice form at all. - const body = buildPayload(op, viewFilterRef.current) + const body = buildPayload(op) if (!body) return if (body.slices.some(sl => !Object.keys(sl).length)) { flash('No dimension or date columns in slice — check col_meta', 'error'); return @@ -1436,7 +1436,11 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio return out } - function buildPayload(op, viewFilter = []) { + // The scope is read from the ref rather than passed in: the request preview in + // the panel calls this too, and when it was a parameter the preview defaulted + // it away -- showing a payload with no scope for a write that had one. + function buildPayload(op) { + const viewFilter = viewFilterRef.current || [] if (!slices.length) return null // Two clicked cells can differ only by a column the operation cannot filter on // (pf_iter, say, which is not in col_meta and so is dropped here). Those become