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},
|
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)
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -35,6 +35,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
modalVisible: false,
|
modalVisible: false,
|
||||||
|
collapsed: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -78,7 +78,6 @@ export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
collapsed: true,
|
|
||||||
colorConverter: null,
|
colorConverter: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue