Document Select2's dynamic option creation (#5052)
This commit is contained in:
parent
dea03a698c
commit
9082a231a6
|
|
@ -43,6 +43,15 @@ Add the `select-no-search` CSS class to disable searching.
|
|||
</select>
|
||||
</div>
|
||||
|
||||
### Dynamic option creation
|
||||
|
||||
In addition to a pre-populated menu of options, Select widgets may dynamically create new options from textual input by the user in the search box. This feature is called "tagging". To enable tagging, set the `tags` option to `true`:
|
||||
|
||||
<select
|
||||
class="form-control custom-select"
|
||||
data-tags="true"
|
||||
></select>
|
||||
|
||||
## Option groups
|
||||
|
||||
Use the `optgroup` element to create option groups.
|
||||
|
|
|
|||
Loading…
Reference in New Issue