Expose createTag
as an option
This is a replacement for the old `createSearchChoice` method which allowed tags to be dynamically created with a custom data object.
This commit is contained in:
parent
024d41b412
commit
751fc63169
6
dist/js/select2.amd.full.js
vendored
6
dist/js/select2.amd.full.js
vendored
@ -2579,6 +2579,12 @@ define('select2/data/tags',[
|
||||
function Tags (decorated, $element, options) {
|
||||
var tags = options.get('tags');
|
||||
|
||||
var createTag = options.get('createTag');
|
||||
|
||||
if (createTag !== undefined) {
|
||||
this.createTag = createTag;
|
||||
}
|
||||
|
||||
decorated.call(this, $element, options);
|
||||
|
||||
if ($.isArray(tags)) {
|
||||
|
6
dist/js/select2.amd.js
vendored
6
dist/js/select2.amd.js
vendored
@ -2579,6 +2579,12 @@ define('select2/data/tags',[
|
||||
function Tags (decorated, $element, options) {
|
||||
var tags = options.get('tags');
|
||||
|
||||
var createTag = options.get('createTag');
|
||||
|
||||
if (createTag !== undefined) {
|
||||
this.createTag = createTag;
|
||||
}
|
||||
|
||||
decorated.call(this, $element, options);
|
||||
|
||||
if ($.isArray(tags)) {
|
||||
|
6
dist/js/select2.full.js
vendored
6
dist/js/select2.full.js
vendored
@ -12114,6 +12114,12 @@ define('select2/data/tags',[
|
||||
function Tags (decorated, $element, options) {
|
||||
var tags = options.get('tags');
|
||||
|
||||
var createTag = options.get('createTag');
|
||||
|
||||
if (createTag !== undefined) {
|
||||
this.createTag = createTag;
|
||||
}
|
||||
|
||||
decorated.call(this, $element, options);
|
||||
|
||||
if ($.isArray(tags)) {
|
||||
|
2
dist/js/select2.full.min.js
vendored
2
dist/js/select2.full.min.js
vendored
File diff suppressed because one or more lines are too long
6
dist/js/select2.js
vendored
6
dist/js/select2.js
vendored
@ -3007,6 +3007,12 @@ define('select2/data/tags',[
|
||||
function Tags (decorated, $element, options) {
|
||||
var tags = options.get('tags');
|
||||
|
||||
var createTag = options.get('createTag');
|
||||
|
||||
if (createTag !== undefined) {
|
||||
this.createTag = createTag;
|
||||
}
|
||||
|
||||
decorated.call(this, $element, options);
|
||||
|
||||
if ($.isArray(tags)) {
|
||||
|
4
dist/js/select2.min.js
vendored
4
dist/js/select2.min.js
vendored
File diff suppressed because one or more lines are too long
6
src/js/select2/data/tags.js
vendored
6
src/js/select2/data/tags.js
vendored
@ -4,6 +4,12 @@ define([
|
||||
function Tags (decorated, $element, options) {
|
||||
var tags = options.get('tags');
|
||||
|
||||
var createTag = options.get('createTag');
|
||||
|
||||
if (createTag !== undefined) {
|
||||
this.createTag = createTag;
|
||||
}
|
||||
|
||||
decorated.call(this, $element, options);
|
||||
|
||||
if ($.isArray(tags)) {
|
||||
|
Loading…
Reference in New Issue
Block a user