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

Support loading targets with params #2189

Merged
merged 4 commits into from
Dec 22, 2020

Conversation

austenc
Copy link
Collaborator

@austenc austenc commented Dec 9, 2020

This PR adds parameter support to wire:target directives as requested in #881 #1965 #1780.

For example:

wire:target="foo('bar')"

Let me know if you'd like me to fix some of the weird formatting that prettier did, or you can think of other scenarios we should add tests for.

Copy link
Member

@joshhanley joshhanley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@austenc looks good!

I was originally thinking to use some form of wire:key or id or something to make the target specific, but I think this is a simpler solution.

The only disadvantage I can see is having to duplicate the whole method call (including all params).

Thanks!

@calebporzio calebporzio merged commit 00a422d into livewire:master Dec 22, 2020
@calebporzio
Copy link
Collaborator

Sick, thanks Austen!

@xdimension
Copy link

Thanks for the fix. But I have an issue when I'm using pagination and go to another page, somehow the loading element doesn't show up (I notice that livewire doesn't add inline-block style).

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

Successfully merging this pull request may close these issues.

None yet

4 participants