Skip to content

Commit

Permalink
fix: update measure name when changing aggregation function
Browse files Browse the repository at this point in the history
  • Loading branch information
nextchamp-saqib committed Nov 7, 2024
1 parent 9d76d3c commit 04bc3c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/src2/query/components/SummarySelectorDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ function confirmSelections() {
placeholder="Agg"
:options="aggregations"
:modelValue="measure.aggregation"
@update:modelValue="measure.aggregation = $event.value"
@update:modelValue="(e: any) => {
measure.aggregation = e.value
measure.measure_name = `${e.value}_${measure.column_name}`
}"
:hide-search="true"
/>
<Autocomplete
Expand All @@ -107,7 +110,7 @@ function confirmSelections() {
@update:model-value="(e: QueryResultColumn) => {
measure.column_name = e.name
measure.data_type = e.type as MeasureDataType
measure.measure_name = `${measure.aggregation}(${e.name})`
measure.measure_name = `${measure.aggregation}_${e.name}`
}"
>
<template #footer>
Expand Down

0 comments on commit 04bc3c7

Please sign in to comment.