Fix chart display element options not saving on create
This commit is contained in:
parent
03e194ffb6
commit
46cb048be2
@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="options"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="mb-3"
|
||||
>
|
||||
@ -16,7 +14,7 @@
|
||||
label-class="text-primary"
|
||||
>
|
||||
<b-form-select
|
||||
v-model="options.type"
|
||||
:value="displayElementOptions.type"
|
||||
:options="chartTypes"
|
||||
@change="typeChanged"
|
||||
/>
|
||||
@ -445,8 +443,8 @@ export default {
|
||||
this.options.colorScheme = (colorscheme || {}).value || ''
|
||||
},
|
||||
|
||||
typeChanged () {
|
||||
this.options = reporter.ChartOptionsMaker(this.options) || {}
|
||||
typeChanged (type) {
|
||||
this.options = reporter.ChartOptionsMaker({ ...this.options, type })
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -546,12 +546,12 @@ export default {
|
||||
|
||||
currentDisplayElement: {
|
||||
get () {
|
||||
return this.displayElements.currentIndex !== undefined ? this.currentDisplayElements[this.displayElements.currentIndex] : undefined
|
||||
return this.displayElements.currentIndex !== undefined ? this.currentBlock.elements[this.displayElements.currentIndex] : undefined
|
||||
},
|
||||
|
||||
set (element) {
|
||||
if (this.displayElements.currentIndex !== undefined) {
|
||||
this.currentDisplayElements[this.displayElements.currentIndex] = element
|
||||
this.currentBlock.elements.splice(this.displayElements.currentIndex, 1, element)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user