protonemedia / laravel-form-components

A set of Blade components to rapidly build forms with Tailwind CSS (v1.0 and v2.0) and Bootstrap 4/5. Supports validation, model binding, default values, translations, Laravel Livewire, includes default vendor styling and fully customizable!

Home Page:https://protone.media/blog/laravel-form-components-to-rapidly-build-forms-with-tailwind-css-and-bootstrap-4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

not possible for select option: selected + disabled?

wivaku opened this issue · comments

Liking this package!

Similar to #44 , I want to add header (and/or separator) options to a select component. But, I want them to be disabled and selected.

The issue: <x-form-select> does not support an option with disabled selected.

E.g. this works for a regular select:

<select>
  <option value="" disabled selected>please select...</option>
  <option value="1">one</option>
</select>

Result is that "please select..." is selected (as expected).

And this does not:

<x-form-select name="...">
  <option value="" disabled selected>please select...</option>
  <option value="1">one</option>
</select>

Result is that "one" is selected.

Note: using in combination with Livewire v2.

This now supported in v3.2.0 :)