Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

critic's avatar

critic wrote a reply+100 XP

5mos ago

First option not working on Select with Livewire

I wish it could be like regular html + php when i dont change value then it is first does alpine x-init does some magic ?

critic's avatar

critic wrote a reply+100 XP

5mos ago

First option not working on Select with Livewire

i use wire:model. I understood that it takes the value from php, but actually it's stupid. if you have a form to add a new record then the first value of select will be included. just like a normal php and html select element

bug! YES

critic's avatar

critic wrote a reply+100 XP

5mos ago

First option not working on Select with Livewire

This is a bug and they must resolve this.

Just like the first element of html + php is sent with it, it should also work in livewire

critic's avatar

critic wrote a reply+100 XP

5mos ago

First option of select dropdown returns NULL

This is not the solution, this is bug, because the base code is html and php and there it works. just like the first element of html + php is sent with it, it should also work in livewire