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: 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},
mixins: [EntityMixin],
data() {
return {
collapsed: true,
}
},
computed: {
parsedValue() {
if (this.value?.is_write_only || this.value?.value == null)

View File

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

View File

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

View File

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

View File

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