1
0
mirror of synced 2024-11-26 14:56:07 +03:00

Added setSearch method

This commit is contained in:
Mike S 2013-05-29 10:24:30 -07:00
parent 30dac9a40b
commit 06130ffc12

View File

@ -1339,6 +1339,16 @@ the specific language governing permissions and limitations under the Apache Lic
this.opts.element.trigger($.Event("select2-close")); this.opts.element.trigger($.Event("select2-close"));
}, },
/**
* Opens control, sets input value, and updates results.
*/
// abstract
setSearch: function (term) {
this.open();
this.search.val(term);
this.updateResults(false);
},
// abstract // abstract
clearSearch: function () { clearSearch: function () {
@ -3024,7 +3034,7 @@ the specific language governing permissions and limitations under the Apache Lic
opts, opts,
select2, select2,
value, multiple, value, multiple,
allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "dropdown", "onSortStart", "onSortEnd", "enable", "readonly", "positionDropdown", "data"], allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "onSortStart", "onSortEnd", "enable", "readonly", "positionDropdown", "data", "setSearch"],
valueMethods = ["val", "opened", "isFocused", "container", "data"]; valueMethods = ["val", "opened", "isFocused", "container", "data"];
this.each(function () { this.each(function () {