Skip to content

Commit

Permalink
fix: cannot select date format
Browse files Browse the repository at this point in the history
  • Loading branch information
nextchamp-saqib committed Sep 11, 2023
1 parent bd36814 commit 9b315c0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frontend/src/query/Column/SimpleColumnPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</template>

<script setup>
import { isEmptyObj, FIELDTYPES } from '@/utils'
import { FIELDTYPES, isEmptyObj } from '@/utils'
import { dateFormats } from '@/utils/format'
Expand Down Expand Up @@ -179,7 +179,7 @@ const showDateFormatOptions = computed(() =>
)
function selectDateFormat(option) {
simpleColumn.column.format_option = {
date_format: option.value,
date_format: typeof option === 'string' ? option : option.value,
}
}
Expand All @@ -206,9 +206,7 @@ function addOrEditColumn() {
aggregation: simpleColumn.aggType.value,
label: simpleColumn.label,
order_by: simpleColumn.order_by,
format_option: showDateFormatOptions.value
? { date_format: simpleColumn.dateFormat.value }
: {},
format_option: showDateFormatOptions.value ? simpleColumn.column.format_option : null,
}
if (!columnNeeded.value) {
Expand Down

0 comments on commit 9b315c0

Please sign in to comment.