forked from platypush/platypush
Defined the collapsed data property on EntityMixin level
This commit is contained in:
parent
78e250186b
commit
9e4fbc6a21
5 changed files with 2 additions and 15 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
},
|
||||
|
|
|
@ -35,6 +35,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
modalVisible: false,
|
||||
collapsed: true,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -51,12 +51,6 @@ export default {
|
|||
components: {EntityIcon},
|
||||
mixins: [EntityMixin],
|
||||
|
||||
data() {
|
||||
return {
|
||||
collapsed: true,
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
hasValues() {
|
||||
return !!Object.values(this?.value?.values || {}).length
|
||||
|
|
|
@ -78,7 +78,6 @@ export default {
|
|||
|
||||
data() {
|
||||
return {
|
||||
collapsed: true,
|
||||
colorConverter: null,
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue