_isItemSelected = function (item) {
    return (ctrl.selected && angular.isArray(ctrl.selected) &&
        ctrl.selected.filter(function (selection) { return angular.equals(selection, item); }).length > 0);
  }
Typeahead mode: lets the user refresh the collection using his own function.

See Expose $select.search for external / remote filtering https://github.com/angular-ui/ui-select/pull/31