code: function checkEnterOnSearch(e,refs){var val=e.target.value;if(val&&val!==''){var res=[];var selected=this.getSelected();var matches=this.search.isThereAnythingRelatedTo(val);matches.forEach(function(el){var index=el.i;el=refs.selectOptions[index];if(selected.indexOf(el)===-1){res.push(el);}});// If only one result is available, select that result.
  // If more than one results, select one only on exact match.
  var selectedIndex=-1;if(res.length===1){selectedIndex=0;}else if(res.length>1){for(var i=0;i<res.length;i++){if(res[i].text.toUpperCase()===val.toUpperCase()){selectedIndex=i;break;}}}if(selectedIndex!=-1){var el=res[selectedIndex];if(!el.disabled){this.setByIndex(el.index,this.multiple);if(this.multipleTags){setTimeout(function(){return refs.search.focus();},200);}if(this.onChange){try{this.onChange(e,this.getSelectedValues());}catch(e){console.warn('something may be wrong in "onChange"',e);}}}}return res;}return false;}
docs: ## checkEnterOnSearch
  
  if enter is pressed in the searchox, if there is only one option
  matching, this selects it
  
  @param {Object} e event object
  @param {Object} refs element references
  
  @return {Void} void