The dropdown shows then the name of the first category (in my case with $category->id of 1)..
After pressing "submit" and reading $this->category in my model, I would expect to find a value of 1. But instead I get NULL. Even if I explictely select the first item in the dropwon, I still get 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
as you have been advised, the html is synced with the state of the livewire component. If the state in the component attribute is null, then the state of the select is also null. The 'bug' is on the html side. When its value is null, and there is no matching option then it has no choice but to show the first option. This does not mean the first option it is selected.