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

Use Alpine's @click.prevent for switching teams #1027

Merged
merged 1 commit into from
Apr 3, 2022
Merged

Use Alpine's @click.prevent for switching teams #1027

merged 1 commit into from
Apr 3, 2022

Conversation

jrd-lewis
Copy link
Contributor

This PR will switch the switchable-team component in the Livewire stack from vanilla JS to Alpine's @click.prevent directive, like my previous PR #989 for the log out link.

@taylorotwell taylorotwell merged commit 02f606f into laravel:2.x Apr 3, 2022
@jrd-lewis jrd-lewis deleted the alpine-switchable-team branch April 4, 2022 13:39
@seabasss
Copy link

seabasss commented Apr 7, 2022

This commit is breaking the jetstream component x-jet-switchable-team that is used in navigation-menu.blade.php. I now get the following error:

syntax error, unexpected token "@", expecting variable or "{" or "$"

<x-jet-switchable-team :team="$team" />
and
<x-jet-switchable-team :team="$team" component="jet-responsive-nav-link" />

Rolling back to 7.2.1 still works.

@jrd-lewis

But maybe that's the purpose of the whole commit to not use x-jet-switchable-team? It came as a surprise to me and others. What should I use instead? Thanks!

@brownkevg
Copy link

brownkevg commented Apr 7, 2022

I also ran into the same issue @seabasss had with version 2.7.2

syntax error, unexpected token "@", expecting variable or "{" or "$"

This fired after creating a new user for me after following the instructions here to create a new app and use the livewire team option
I was able to downgrade to 2.7.1 and it worked as well for me.

@driesvints
Copy link
Member

Does it work for you both if you use @@click.prevent="$root.submit();"? Note the double @@.

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.

5 participants