-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Description
a selectize
with maxItems
> 1 is still visible when using a customized bootstrap5 theme, my only customization on bootstrap is adding additional colors for theming
// C# Code
@* Filter Field *@
<div class="row g-3 align-items-center mb-2">
<div class="col-4">
<label class="form-label" asp-for="@Model.Items">Items</label>
</div>
<div class="col-8">
<select class="form-select" multiple asp-for="@Model.Items" placeholder="Select Items...">
@* <option></option> *@
<option value="0">No Item</option>
<optgroup label="Other Crate">
@foreach (var row in Model.ListItems)
{
<option value="@r.Index">
@($"{row.Title} {row.Index}")
</option>
}
</optgroup>
</select>
</div>
</div>
...
// js code
$("#ModelItems").selectize({
plugins: [ "remove_button" ],
delimiter: ",",
maxItems: 2,
closeAfterSelect: false,
});
workarounds: add the hidden
property on the original select
Metadata
Metadata
Assignees
Labels
No labels