Vue-js-modal: Event "opened"

Created on 11 May 2017  路  6Comments  路  Source: euvl/vue-js-modal

I'm trying to set the focus on an element once the modal is opened. However, the $refs item is undefined after the 'opened' event is emitted. I set a breakpoint and saw that the modal wasn't visible before the emit was emitted:

event

Relevant code:

<modal name="addContactModal" @opened="opened">
<input type="text" ref="focus"/>
opened (event) {
  this.$refs.focus.focus();
},

Do you have an idea?

bug help wanted looks good to me

Most helpful comment

Published in + [email protected]

All 6 comments

Hey, thanks a lot for an issue!
The event should be generated in different place tbh, in "watch" section.

I still didn't get the point...
can any one tell me how to do this?

Its not published, didnt have time to rewier pr

@euvl when you can publish?

Whenever I will have time to do tests

Published in + [email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bicstone picture bicstone  路  4Comments

Max64 picture Max64  路  4Comments

ptilli picture ptilli  路  3Comments

smholsen picture smholsen  路  4Comments

whaoran picture whaoran  路  3Comments