Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update close-modal.md #16

Closed

Conversation

RicardoSwitchNetwork
Copy link

In Vue 3.5+ the ways refs work have been significantly changed and the older method no longer works.

https://vuejs.org/guide/essentials/template-refs.html#accessing-the-refs

@pascalbaljet
Copy link
Contributor

You can still use ref. It's not a breaking change, right?

@RicardoSwitchNetwork
Copy link
Author

@pascalbaljet Afaik, you can no longer use ref.

When I do modalRef.value.close(); I get: TypeError: modalRef.value is null

@pascalbaljet
Copy link
Contributor

Ok, thanks for reporting. I'll investigate it further, as I'm also using Vue 3.5 in the demo app 🤔

@pascalbaljet pascalbaljet added the documentation Improvements or additions to documentation label Oct 24, 2024
@pascalbaljet
Copy link
Contributor

It still works with ref! There has been a fix in v0.6 for the modalRef disappearing, so could you please upgrade and check if the problem still exists? Thanks!

@RicardoSwitchNetwork
Copy link
Author

@pascalbaljet I just upgraded to version 0.6 as per your suggestion, but unfortunately my code still does not work unless I use useTemplateRef. It does not work regular ref, so I still feel like this should be mentioned in the documentation.

@pascalbaljet
Copy link
Contributor

That's a bummer! Can you share the complete code of the Modal component?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants