[Vuejs]-Trigger modal from child component

0👍

You are on your way but are missing a couple of steps.

1)

Add a ref to your Modal component, you can call on later.

<Modal ref="myModal"/>

2)

Inside your Modal component, you have to add an open method, that shows it. Typically done by changing the display: none

3)

Finally inside your showMoreInfo method you call your open method like this:

this.$refs.myModal.open();

Leave a comment