This is GOLD! I preffer to use ChoicesJS over Select2, and as you said in the video it was easy to migrate from what you explained to the usage of that library 🙌
Well it can be done more easy even using Alpine which is bundled with Lifewire 3. Just make yourself a blade component like that. In this case I use selectize instead of select2, but the principle is the same. This way code is more in place. The advantage is you do not have to care about updating the script anytime you add another select field to the same form. It is all done by itself. Then when I need a select I can just write: # selectize.blade.php in components @props([ 'field' => '', 'list' => [], ])
@foreach($list as $value => $name) {{ $name }} @endforeach
@@yelocode you made mention of using alpine js for multi select drop down, could you drop a guide on that, or probably a link here in the comment section.
If you use "wire:ignore" for a select field, what happens if the options in that field can change? For instance, if you have a country and state dropdown, and the state options depend on the chosen country. We've been facing this issue with Livewire and would appreciate your assistance.
try my solution with alpine and use: x-data="{ value: @entangle($attributes->wire('model')) }" x-on:change="value = $event.target.value" and x-bind:value="value" in the select object. This should serve your purpose. Didn't try it out yet but I use something very similar to get Pickaday working with Livewire and this works.
I want to create a live event that applies select2, when the user selects a car brand, immediately selecting the car model will have data. Is it possible to do so?
If you use $wire.set , it will perform live updates by default, to listen for the changes, you can add a lifecycle hook, livewire.laravel.com/docs/lifecycle-hooks#update I also have a video on lifecycle hooks, if you are interested: ruclips.net/video/QADUTtkH68Q/видео.html
Thanks🥰
Thanks for watching Hamad
Finally someone is proud of working with jquery! I love you!
This is GOLD! I preffer to use ChoicesJS over Select2, and as you said in the video it was easy to migrate from what you explained to the usage of that library 🙌
Thank you so much, that's really solved my issue, I just forgot to add wire:ignore on the main div, so I got unexpected behavior
Thank you so much! you solved my problem
How to validate the select2 Livewire v3. Move your @error() directive outside wire:ignore div
thank you bro, you give me a BIG HELP, THANKH YOU VERY MUCH
Thanks for watching. Glad to hear that.
Amazing tutorials no one is doing them as well as you!! Could you do a video on infinite scrolling in laravel please?
Thanks for watching, I will try to cover it in a video
So helpfully, thank u❤❤
Thanks for watching, Glad it was helpful.
👍👍👍👍
I think you have livewire tutorial details. No channel have this kind of tutorial. Please teach multi step form using livewire
THe multi-step form is what am working on currently.
The best teacher I have ever seen
I have not used flowbite pro so can't give an opinion on it, I personally prefer tailwind ui.
@@yelocode thanks bro . Good job
Well it can be done more easy even using Alpine which is bundled with Lifewire 3.
Just make yourself a blade component like that. In this case I use selectize instead of select2, but the principle is the same. This way code is more in place.
The advantage is you do not have to care about updating the script anytime you add another select field to the same form. It is all done by itself.
Then when I need a select I can just write:
# selectize.blade.php in components
@props([
'field' => '',
'list' => [],
])
@foreach($list as $value => $name)
{{ $name }}
@endforeach
Dear, sir, I follow your videos every day; please create a video on Livewire 3 and Cropper.js to crop and store the cropped image, if it is possible.
thanks for watching, will try covering it
this @script tag bugging for a while, i hope this going to save my years of doubt how to use jquery in livewire beautifully.
Thanks for great tut
Thanks for watching.
Thanks for the video. ❤
You're welcome 😊
@@yelocode you made mention of using alpine js for multi select drop down, could you drop a guide on that, or probably a link here in the comment section.
Great guy, excellent explaining. Excellent work.!! How can i spend you a cappuccino?
If you use "wire:ignore" for a select field, what happens if the options in that field can change? For instance, if you have a country and state dropdown, and the state options depend on the chosen country. We've been facing this issue with Livewire and would appreciate your assistance.
try my solution with alpine and use:
x-data="{ value: @entangle($attributes->wire('model')) }"
x-on:change="value = $event.target.value"
and
x-bind:value="value"
in the select object. This should serve your purpose. Didn't try it out yet but I use something very similar to get Pickaday working with Livewire and this works.
You mentioned that you didnt use select2 personally. Mind to share what you use ?
With livewire I usually use alpinejs. If you use jetstream or breeze, it comes with a dropdown component out the box
@@yelocode Thanks for the reply. Really appreciated.
only problem i found if you have your select not rendered at first because of a condition, you need to init it on load with something like alpinejs
If I use in filter but when delete in select it send to backend and make filter it save the value ancient why I use live wire and select2
Hi! What about this kind of multi select dropdown inside a modal? (Select2, choices etc..) Like with the wire elements package?
How to clear/empty select2 after form submit?
Hello, I need help? can get live that variable?
I want to create a live event that applies select2, when the user selects a car brand, immediately selecting the car model will have data. Is it possible to do so?
If you use $wire.set , it will perform live updates by default, to listen for the changes, you can add a lifecycle hook,
livewire.laravel.com/docs/lifecycle-hooks#update
I also have a video on lifecycle hooks, if you are interested:
ruclips.net/video/QADUTtkH68Q/видео.html
i got $wire is not defined.
Make sure you have the @script directive otherwise $wire wont work
@@yelocode works thank you...
Thank you so much! you solved my problem