Livewire multiple selection

👁 88 SzerzƑ: Fejes Dávid Frissítette: Fejes Dávid Frissítve:
#Laravel #JavaScript

https://dev.to/koossaayy/laravel-livewire-multiple-selection-with-virtual-select-1f87

In order to pass the data to Livewire, we will use the JavaScript event listener, whenever the selection is changed, we will send them to our component. So in our view file, what we need to add is the following code let selectedPermissions = document.querySelector('#permissions'); selectedPermissions.addEventListener('change', () => { let data = selectedPermissions.value; @this.set('selectedPermissions', data); });
HozzĂĄszĂłlĂĄsok
0 db
HozzĂĄszĂłlĂĄshoz jelentkezz be.
Még nincs hozzåszólås.