livewire
livewire copied to clipboard
add emitOthers feature
Review the contribution guide first at: https://laravel-livewire.com/docs/2.x/contribution-guide
1️⃣ Is this something that is wanted/needed? Did you create a discussion about it first? It's really useful, but I didn't create a discussion about it.
2️⃣ Did you create a branch for your fix/feature? (Master branch PR's will be closed) Yes
3️⃣ Does it contain multiple, unrelated changes? Please separate the PRs out. No
4️⃣ Does it include tests? (Required) Yes
5️⃣ Please include a thorough description (including small code snippets if possible) of the improvement and reasons why it's useful. When we have many components on the same page listening for the same event, if one component fire an event, all components (inclusive self) will listen for the event. Sometimes we need to emit the event but not listen for it in the current component, just send to the others
with emit others
A => listening for Bar
B => listening for Bar
A => emit bar
A => nothing
B => receives Bar event
with emit
A => listening for Bar
B => listening for Bar
A => emit bar
A => receives Bar event
B => receives Bar event
Thanks for contributing! 🙌
@PH7-Jack thanks for the PR! Seems like there is some issues with your tests, can you have a look and see if you can fix it up? Thanks!
@joshhanley Oh, I didn't commit the js compilated files. I see now in the contribution guide to complies them.
Hummm, still failing the pipeline. In the local the pipeline pass
@PH7-Jack all looks ok now 🙂
While we're developing V3, we're trying to keep V2 stable and limit API changes/additions. In that spirit, PR's like this that may otherwise make sense to merge, we're unfortunately closing. Feel free to PR this once V3 has been released. Thank for your effort and input!