Skip to content
Snippets Groups Projects
Commit e65b5320 authored by Jörg Richter's avatar Jörg Richter
Browse files

Mirror "props" as "data"

This supports manual mounting the component in conjunction with manual data update without mutation warning
parent 81d21c54
No related branches found
No related tags found
No related merge requests found
Pipeline #882 passed
......@@ -38,6 +38,14 @@ export default {
quillConfig: Object
},
data () {
return {
// mirror props ### FIXME: add remaining props?
object_: this.object,
writable_: this.writable
}
},
computed: mapState({
topicmapRenderer: state => state.topicmapPanel.topicmapRenderer,
loading: state => state.topicmapPanel.loading
......@@ -45,16 +53,16 @@ export default {
watch: {
object () {
// console.log('object watcher', this.object)
object_ () {
// console.log('object_ watcher', this.object_)
this.checkTopicmapRenderer()
this.topicmapRenderer.object = this.object
this.topicmapRenderer.object = this.object_
},
writable () {
// console.log('writable watcher', this.writable)
writable_ () {
// console.log('writable_ watcher', this.writable_)
this.checkTopicmapRenderer()
this.topicmapRenderer.writable = this.writable
this.topicmapRenderer.writable = this.writable_
}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment