1
0
Fork 0
mirror of synced 2025-04-05 22:23:35 +03:00

Compare commits

...

2 commits

Author SHA1 Message Date
IvanLutokhin
53db0130d1
Merge pull request #1 from retailcrm/patch-create-tag-force
Add new option 'createTagForce'
2019-11-14 11:03:16 +03:00
Ivan Lutokhin
85132b45fe Add new option 'createTagForce' 2019-11-14 10:03:34 +03:00
5 changed files with 11 additions and 5 deletions

View file

@ -3687,6 +3687,8 @@ S2.define('select2/data/tags',[
}
function wrapper (obj, child) {
var createTagForce = self.options.get('createTagForce') || false;
var data = obj.results;
for (var i = 0; i < data.length; i++) {
@ -3704,7 +3706,7 @@ S2.define('select2/data/tags',[
var checkText = optionText === paramsTerm;
if (checkText || checkChildren) {
if (!createTagForce && (checkText || checkChildren)) {
if (child) {
return false;
}

File diff suppressed because one or more lines are too long

4
dist/js/select2.js vendored
View file

@ -3687,6 +3687,8 @@ S2.define('select2/data/tags',[
}
function wrapper (obj, child) {
var createTagForce = self.options.get('createTagForce') || false;
var data = obj.results;
for (var i = 0; i < data.length; i++) {
@ -3704,7 +3706,7 @@ S2.define('select2/data/tags',[
var checkText = optionText === paramsTerm;
if (checkText || checkChildren) {
if (!createTagForce && (checkText || checkChildren)) {
if (child) {
return false;
}

File diff suppressed because one or more lines are too long

View file

@ -41,6 +41,8 @@ define([
}
function wrapper (obj, child) {
var createTagForce = self.options.get('createTagForce') || false;
var data = obj.results;
for (var i = 0; i < data.length; i++) {
@ -58,7 +60,7 @@ define([
var checkText = optionText === paramsTerm;
if (checkText || checkChildren) {
if (!createTagForce && (checkText || checkChildren)) {
if (child) {
return false;
}