fix(ui): user journey is not sending the metricValue
This commit is contained in:
parent
7a8be69c85
commit
a4b65c618f
3 changed files with 4 additions and 4 deletions
|
|
@ -109,7 +109,7 @@ const FilterSection = observer(({ layout, metric, excludeFilterKeys, excludeCate
|
|||
return newState;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const allCollapsed = Object.values(seriesCollapseState).every((v) => v);
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ export default class MetricStore {
|
|||
|
||||
// handle metricValue change
|
||||
if (obj.hasOwnProperty('metricValue') && obj.metricValue !== this.instance.metricValue) {
|
||||
if (Array.isArray(obj.metricValue) && obj.metricValue.length > 1) {
|
||||
if (Array.isArray(obj.metricValue) && obj.metricValue.length > 0) {
|
||||
obj.metricValue = obj.metricValue.filter((i: any) => i.value !== 'all');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ export default class Widget {
|
|||
name: string = 'Untitled Card';
|
||||
metricType: string = 'timeseries';
|
||||
metricOf: string = 'sessionCount';
|
||||
metricValue: any = '';
|
||||
metricValue: [] = [];
|
||||
viewType: string = 'lineChart';
|
||||
metricFormat: string = 'sessionCount';
|
||||
series: FilterSeries[] = [];
|
||||
|
|
@ -454,7 +454,7 @@ export default class Widget {
|
|||
|
||||
private metricValueToArray(metricValue: any) {
|
||||
if (!Array.isArray(metricValue)) return metricValue;
|
||||
return metricValue.map((i: any) => i.value);
|
||||
return metricValue.map((i: any) => i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue