Skip to content

Commit

Permalink
Document Select2's dynamic option creation (#5052)
Browse files Browse the repository at this point in the history
  • Loading branch information
meysammahfouzi authored Jul 1, 2020
1 parent dea03a6 commit 9082a23
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/system/assets/ui/docs/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9082a23

Please sign in to comment.