Document Select2's dynamic option creation (#5052)

This commit is contained in:
Meysam 2020-07-01 04:11:16 +02:00 committed by GitHub
parent dea03a698c
commit 9082a231a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -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.