From 68a199fc985f8dbe57473959e90f10b690e780d2 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 8 Mar 2016 20:28:36 -0500 Subject: [PATCH] Added initial questions for tagging docs --- docs/_includes/options/dropdown.html | 1 + docs/_includes/options/dropdown/tagging.html | 50 ++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 docs/_includes/options/dropdown/tagging.html diff --git a/docs/_includes/options/dropdown.html b/docs/_includes/options/dropdown.html index b09fb6a3..52d8ea25 100644 --- a/docs/_includes/options/dropdown.html +++ b/docs/_includes/options/dropdown.html @@ -5,5 +5,6 @@ {% include options/dropdown/filtering.html %} {% include options/dropdown/selections.html %} + {% include options/dropdown/tagging.html %} {% include options/dropdown/placement.html %} \ No newline at end of file diff --git a/docs/_includes/options/dropdown/tagging.html b/docs/_includes/options/dropdown/tagging.html new file mode 100644 index 00000000..7ab3fe8c --- /dev/null +++ b/docs/_includes/options/dropdown/tagging.html @@ -0,0 +1,50 @@ +
+

+ Can options be created based on the search term? +

+ +

+ How do I enable tagging? +

+ +{% highlight js linenos %} +$('select').select2({ + tags: true +}); +{% endhighlight %} + + {% include options/not-written.html %} + +

+ Does tagging work with a single select? +

+ + {% include options/not-written.html %} + +

+ How do I add extra properties to the tag? +

+ + {% include options/not-written.html %} + +

+ Can I control when tags are created? +

+ + {% include options/not-written.html %} + +

+ How do I control the placement of the option? +

+ +{% highlight js linenos %} +$('select').select2({ + insertTag: function (data, tag) { + // Insert the tag at the end of the results + data.push(tag); + } +}); +{% endhighlight %} + + {% include options/not-written.html %} +
\ No newline at end of file