mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-14 09:08:32 +00:00
Merge branch 'fix-sort-direction-reset' into 'develop'
Fix sort direction reactivity for chart config See merge request baserow/baserow!3208
This commit is contained in:
commit
86c51b5cca
2 changed files with 8 additions and 0 deletions
enterprise/web-frontend/modules/baserow_enterprise/dashboard/components/data_source
web-frontend/modules/core/components
|
@ -25,6 +25,8 @@
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<SegmentControl
|
<SegmentControl
|
||||||
|
v-if="aggregationSorts.length > 0"
|
||||||
|
ref="sortDirectionSegment"
|
||||||
:active-index="orderDirectionIndex"
|
:active-index="orderDirectionIndex"
|
||||||
:segments="orderDirectionOptions"
|
:segments="orderDirectionOptions"
|
||||||
:initial-active-index="orderDirectionIndex"
|
:initial-active-index="orderDirectionIndex"
|
||||||
|
@ -80,6 +82,9 @@ export default {
|
||||||
this.orderDirectionIndex = this.orderDirectionOptions.findIndex(
|
this.orderDirectionIndex = this.orderDirectionOptions.findIndex(
|
||||||
(item) => item.value === aggregationSorts[0].direction
|
(item) => item.value === aggregationSorts[0].direction
|
||||||
)
|
)
|
||||||
|
if (this.$refs.sortDirectionSegment) {
|
||||||
|
this.$refs.sortDirectionSegment.reset()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.sortReference = null
|
this.sortReference = null
|
||||||
this.orderDirectionIndex = 0
|
this.orderDirectionIndex = 0
|
||||||
|
|
|
@ -92,6 +92,9 @@ export default {
|
||||||
this.activeIndex = index
|
this.activeIndex = index
|
||||||
this.$emit('update:activeIndex', index)
|
this.$emit('update:activeIndex', index)
|
||||||
},
|
},
|
||||||
|
reset() {
|
||||||
|
this.activeIndex = this.initialActiveIndex
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue