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

How pass parameters to modal? #855

Open
LeoMachado94 opened this issue Jan 19, 2024 · 5 comments
Open

How pass parameters to modal? #855

LeoMachado94 opened this issue Jan 19, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@LeoMachado94
Copy link

LeoMachado94 commented Jan 19, 2024

I need pass parameters to modal, and I tried many ways to this, but without success.

@LeoMachado94 LeoMachado94 added the bug Something isn't working label Jan 19, 2024
@dfikeda
Copy link

dfikeda commented Jan 20, 2024

Prease verify if the documentation if it is relative for your version.
The default instalation, installs the V1, and documentation is default for v2.
Additionally, you must fill in the information in order to assist you in what you are actually trying to do, for example, what are these parameters?

@LeoMachado94
Copy link
Author

Right, I installed it as the v2 documentation asks, and in my composer I have "wireui/wireui": "^1.18".
@dfikeda The documentation says that we can invoke $openModal('modal-name'). In this scenario, I have a modal that is used to exclude users, and I would like to use the same modal just informing the user's ID. I wouldn't like to have 10 exclusion modes for a list of 10 users, I understand that there would be too many unnecessary components.
I would like to do something like $openModal('delete-users', $userId).

@LeoMachado94
Copy link
Author

At the moment I am using it as shown in the image below, but I understand that it would be much better to have 1 deletion modal component that would be reused for any user that needs to be removed, and not 10 components (1 for each user).
Screenshot 2024-01-20 at 21 45 16

@dfikeda
Copy link

dfikeda commented Jan 21, 2024

You can use this package to dinamic modal:
https://github.com/wire-elements/modal

@LeoMachado94
Copy link
Author

I thought about using it, I already use it in other projects. But ideally, wireui would do this too.
Do you see any performance problems using it as shown in the image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants