Level 122
what does your html look like and what is going wrong?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have upgraded my Livewire version to Latest and Select2 is disturbed after form submission. Although it was working in Previous version(2) of livewire. Here is my code.
public function hydrate()
{
$this->dispatch('select2');
}
$(document).ready(function() {
$('#designation_id').select2({
placeholder: 'Select a Company',
allowClear: true
});
});
document.addEventListener('DOMContentLoaded', function() {
Livewire.on('showDesc', function() {
$('#designation_id').select2();
});
});
Please or to participate in this conversation.