Fix empty Select2 input from throwing an error when attempting to selecting a value.
This commit is contained in:
parent
819cca7e70
commit
770924ca8d
@ -2361,7 +2361,7 @@
|
|||||||
return markup.join("");
|
return markup.join("");
|
||||||
},
|
},
|
||||||
formatSelection: function (data, container) {
|
formatSelection: function (data, container) {
|
||||||
return data.text;
|
return data ? data.text : undefined;
|
||||||
},
|
},
|
||||||
formatResultCssClass: function(data) {return undefined;},
|
formatResultCssClass: function(data) {return undefined;},
|
||||||
formatNoMatches: function () { return "No matches found"; },
|
formatNoMatches: function () { return "No matches found"; },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user