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

VaModal load component via VaModal Instance #4267

Open
raizdev opened this issue May 12, 2024 · 1 comment
Open

VaModal load component via VaModal Instance #4267

raizdev opened this issue May 12, 2024 · 1 comment

Comments

@raizdev
Copy link

raizdev commented May 12, 2024

Is your feature request related to a problem? Please describe.
It is not possible to load your component via VaModal the instance.
That makes it difficult for me to use VaModal the way it is now.

On discord we talked already how this could be implemented,
you came with a solution which I think that could be way.

const { show, hide } = useModal('myModal', {
  onOk() {},
  onCacnel() {},
  onClose() {},
})
<VaModal ref="myModal">
   <EditUserForm ... />
</VaModal>

Sidenote m0ksem
The only problem with that is because of vue bug in script setup this will not work when VaModal is passed inside slot. But since Modal is fixed window there are no use cases to have it in slot...

The feature request is to reconsider the way VaModal is implemented now.

@m0ksem
Copy link
Contributor

m0ksem commented May 23, 2024

We already have useModal composable, designed to make new component instances similar to useToast.
RN it doesn't require any arguments. We can change behavior in case if argument is passed.

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

No branches or pull requests

2 participants