Your experience on this site will be improved by allowing cookies.
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