diff --git a/client/web/compose/src/components/PageBlocks/MetricBase.vue b/client/web/compose/src/components/PageBlocks/MetricBase.vue index 15bd3cb58..64dd5bf1c 100644 --- a/client/web/compose/src/components/PageBlocks/MetricBase.vue +++ b/client/web/compose/src/components/PageBlocks/MetricBase.vue @@ -182,7 +182,7 @@ export default { * Based on drill down configuration, either changes the linked block on the page * or opens it in a modal wit the filter and dimensions from the chart and the clicked value */ - drillDown ({ label: name, filter, moduleID, drillDown }, metricIndex) { + drillDown ({ label: name = '', filter, moduleID, drillDown }, metricIndex) { if (!drillDown.enabled) { return } diff --git a/client/web/compose/src/components/PageBlocks/MetricConfigurator/index.vue b/client/web/compose/src/components/PageBlocks/MetricConfigurator/index.vue index 1d594e821..0d3d3c87e 100644 --- a/client/web/compose/src/components/PageBlocks/MetricConfigurator/index.vue +++ b/client/web/compose/src/components/PageBlocks/MetricConfigurator/index.vue @@ -186,6 +186,7 @@ :reduce="f => f.name" :calculate-position="calculateDropdownPosition" class="bg-white" + @input="onMetricFieldChange" /> @@ -415,11 +416,6 @@ export default { this.edit.dateFormat = this.edit.dateFormat || 'YYYY-MM-DD' } }, - 'edit.metricField': function (mf) { - if (mf === 'count') { - this.edit.operation = undefined - } - }, }, created () { @@ -472,6 +468,14 @@ export default { return operation }, + onMetricFieldChange (field) { + if (field === 'count') { + this.edit.operation = undefined + } else if (!this.edit.operation) { + this.edit.operation = this.aggregationOperations[0].operation + } + }, + setDefaultValues () { this.edit = undefined this.dimensionModifiers = []