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:
Relevant code:
<modal name="addContactModal" @opened="opened">
<input type="text" ref="focus"/>
opened (event) {
this.$refs.focus.focus();
},
Do you have an idea?
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]
Most helpful comment
Published in
+ [email protected]