Open jlevers opened 12 hours ago
@jlevers If you set the default value of $selectedColor
to '' (e.g. public string $selectedColor = '';
in the component), the placeholder should be displayed (works in my test using your initial code) without the need for the <flux:option value="" disabled selected>Choose a color...</flux:option>
Problem
When using a select box with dynamically generated options and a model key attached, the
placeholder
field is not applied, and the first option in the select appears in the select box in a disabled state.Code to reproduce
Blade template
Livewire component
Here's how this renders:
I can fake a placeholder with the code below, but would expect the
placeholder
attribute to still work if I'm passing dynamic options.