In laravel-livewire alpineJS app clicking on selected subitems #698
sergeynilov
started this conversation in
4. General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Helo,
In laravel 7 /livewire 1.3 / turbolinks:5.2 / alpine@v2 app I make selection input of states and on state selected I
show listing of related regions. When user clicks on one of regions, related region must be opened and I search how to implement it.
In component :
In resources/views/livewire/states-with-regions.blade.php :
For regions selection I use state.id, but for state I need to use state.code
In the code above I use selected_state_id for selected state id, but I also need
to fill selected_state_code with selected state code. How can I do it?
I need to move to hostels list clicking on hostelsByRegion( link in the code above. Now it dose not work.
In the browser I see : https://prnt.sc/tvin91
Looks like that is invalid way. How can I do it?
As I need to move to hostelsByRegion action is it better to make it as 1 more component with template or I can use several
methods with tremplate in 1 StatesWithRegions component?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions