Selectize.js - Adding placeholder option breaks the input [solved I guess]
This is the default look of my select input.
When I try to add a default "selected disabled" option to it, it only shows the placeholder text but not the products. Like this ;
<label class="mb-3 ps-1">Select Product</label>
<select name="product_id" id="product_id" class="form-control" required>
<option value="">Select a product</option>
@foreach($products as $product)
<option value="{{$product['id']}}">{{$product['name']}}</option>
@endforeach
</select>
It's been weeks since I'm having this problem and I'm starting to hate selectize. Any other alternative suggestions to selectize will be very welcomed. I'm only gonna use it for search/autocomplete in my select inputs. No multi-select or anything.
Oh I'll be damned. Looks like it was the "required" part that's messing selectize up. If you don't put a "required" on select input, you can show the placeholder just fine. But if you make it required, it doesn't show the list until you start typing. That's just disgusting.