I currently call open() on keypress, but while it opens it, the search box is empty. I'd like to take that captured keypress and also insert it into the search box. I can seem to figure out how to selected it. the select2 data object doesn't have $search attached to it that I can find.
Any ideas?
var keyString = evt.key;
s2Obj.open();
s2Obj.dropdown.$search.val(keyString);
// s2Obj.dropdown.$search.trigger('keyup'); //doesn't trigger?
s2Obj.trigger('query', {term:keyString});
evt.preventDefault();
For some reason triggering the keyup on the search doesn't do a thing, so I just tell it to do the search with that particular term