Start modals on mount, not create
The calibration modal was not starting properly, because the component was not mounted when its show method was called. Calling it from the `mounted` method solves the problem and we don't get the error. I'm not 100% sure this was introduced by refactoring the taskSubmitter, though it's possible. However, I think the fix is uncontroversial and it should probably have been there all along.
This commit is contained in:
parent
fb07343cdd
commit
fef53c1176
1 changed files with 7 additions and 7 deletions
|
|
@ -253,12 +253,6 @@ export default {
|
|||
...mapState({ imjoyEnabled: "imjoyEnabled" })
|
||||
},
|
||||
|
||||
created: function() {
|
||||
if (this.$store.getters.ready) {
|
||||
this.startModals();
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
// A global signal listener to switch tab
|
||||
this.$root.$on("globalSwitchTab", tabID => {
|
||||
|
|
@ -272,6 +266,9 @@ export default {
|
|||
this.$root.$on("globalDecrementTab", () => {
|
||||
this.incrementTabBy(-1);
|
||||
});
|
||||
if (this.$store.getters.ready) {
|
||||
this.startModals();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
@ -289,7 +286,10 @@ export default {
|
|||
this.currentTab = newId;
|
||||
},
|
||||
startModals: function() {
|
||||
this.$refs["calibrationModal"].show();
|
||||
console.log(this.$refs);
|
||||
let modal = this.$refs.calibrationModal;
|
||||
console.log("modal", modal);
|
||||
modal.show();
|
||||
},
|
||||
enterApp: function() {
|
||||
// Stuff to do once connected and all init modals are finished
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue