1
0
mirror of synced 2024-11-22 21:16:10 +03:00

adding trim to opts.createSearchChoice default function to avoid mismatches with val object

This commit is contained in:
Tim Atkinson 2013-07-02 10:35:12 -04:00
parent be535c7a77
commit a469143f01

View File

@ -960,7 +960,7 @@ the specific language governing permissions and limitations under the Apache Lic
} else if ("tags" in opts) {
opts.query = tags(opts.tags);
if (opts.createSearchChoice === undefined) {
opts.createSearchChoice = function (term) { return {id: term, text: term}; };
opts.createSearchChoice = function (term) { return {id: $.trim(term), text: $.trim(term)}; };
}
if (opts.initSelection === undefined) {
opts.initSelection = function (element, callback) {