Defined the collapsed data property on EntityMixin level

This commit is contained in:
Fabio Manganiello 2023-01-15 15:29:26 +01:00
parent 78e250186b
commit 9e4fbc6a21
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774
5 changed files with 2 additions and 15 deletions

View file

@ -54,12 +54,6 @@ export default {
components: {Slider, EntityIcon}, components: {Slider, EntityIcon},
mixins: [EntityMixin], mixins: [EntityMixin],
data() {
return {
collapsed: true,
}
},
computed: { computed: {
parsedValue() { parsedValue() {
if (this.value?.is_write_only || this.value?.value == null) if (this.value?.is_write_only || this.value?.value == null)

View file

@ -46,7 +46,6 @@ export default {
data() { data() {
return { return {
component: null, component: null,
collapsed: true,
justUpdated: false, justUpdated: false,
} }
}, },
@ -94,7 +93,7 @@ export default {
toggleCollapsed() { toggleCollapsed() {
this.collapsed = !this.collapsed this.collapsed = !this.collapsed
// Propagate the collapsed state to the wrapped component if applicable // Propagate the collapsed state to the wrapped component if applicable
if ('collapsed' in this.instance) if (this.instance)
this.instance.collapsed = !this.instance.collapsed this.instance.collapsed = !this.instance.collapsed
} }
}, },

View file

@ -35,6 +35,7 @@ export default {
data() { data() {
return { return {
modalVisible: false, modalVisible: false,
collapsed: true,
} }
}, },

View file

@ -51,12 +51,6 @@ export default {
components: {EntityIcon}, components: {EntityIcon},
mixins: [EntityMixin], mixins: [EntityMixin],
data() {
return {
collapsed: true,
}
},
computed: { computed: {
hasValues() { hasValues() {
return !!Object.values(this?.value?.values || {}).length return !!Object.values(this?.value?.values || {}).length

View file

@ -78,7 +78,6 @@ export default {
data() { data() {
return { return {
collapsed: true,
colorConverter: null, colorConverter: null,
} }
}, },