Closed geekyfox90 closed 5 years ago
Hi @geekyfox90 Thank your for using our products and for posting the issue. Unfortunately the issue is not related to the template itself.
This is a common "problem" if you're using function ()
anonymous functions instead of arrow functions.
An anonymous function has its own context and respectively this
inside the function will be the function context.
An arrow function on the other side inherits the parent context and respectively this
inside an arrow function will be the parent context, which in our case is the component.
To fix your problem just use
setTimeout(()=> {
this.showModal = true
},3000)
Prerequisites
Expected Behavior
I'm using a modal as described in the documentation, but when I'm using the following code in order to show the modal, it doesn't work.
Please describe the behavior you are expecting
The modal should also be show when the variable showModal is updated inside setTimeout
Current Behavior
What is the current behavior?
The modal shows only when showModal is updated outside
setTimeout