2

I am using Modal component from vue strap. I want to know if an action/method can be run if modalshow is false. Basically I want to do a status check and then refresh the page when the modal closes.

1
  • 1
    You should post some code here. Commented Jun 15, 2016 at 14:29

1 Answer 1

2

use watch in parent component:

watch: {
  'showModal': function (newVal, oldVal) {
    if(newVal == false)
      doSomething();
  }
},

when modal show status changes this event should fire up. Remember to use twoWay binding in modal component for showModal:

<modal large :show.sync="showModal" effect="zoom">
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.