default initSelection in tags mode instead of overriding it. fixes #811
This commit is contained in:
parent
d1e9531a0a
commit
270d4bad07
@ -789,6 +789,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
if (opts.createSearchChoice === undefined) {
|
if (opts.createSearchChoice === undefined) {
|
||||||
opts.createSearchChoice = function (term) { return {id: term, text: term}; };
|
opts.createSearchChoice = function (term) { return {id: term, text: term}; };
|
||||||
}
|
}
|
||||||
|
if (opts.initSelection === undefined) {
|
||||||
opts.initSelection = function (element, callback) {
|
opts.initSelection = function (element, callback) {
|
||||||
var data = [];
|
var data = [];
|
||||||
$(splitVal(element.val(), opts.separator)).each(function () {
|
$(splitVal(element.val(), opts.separator)).each(function () {
|
||||||
@ -803,6 +804,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (typeof(opts.query) !== "function") {
|
if (typeof(opts.query) !== "function") {
|
||||||
throw "query function not defined for Select2 " + opts.element.attr("id");
|
throw "query function not defined for Select2 " + opts.element.attr("id");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user