Skip to content

Instantly share code, notes, and snippets.

@karptonite
Created September 29, 2015 22:45
Show Gist options
  • Save karptonite/3f72ec9e0f8c0d912d57 to your computer and use it in GitHub Desktop.
Save karptonite/3f72ec9e0f8c0d912d57 to your computer and use it in GitHub Desktop.
<ui-select
multiple
tagging="makeNonUserPlayer"
tagging-label="false"
ng-model="play.players"
force-options-down="true"
on-select="selectPlayerCallback($item)"
focus-on="AddPlayerFocus"
theme="bootstrap">
<ui-select-match hide-tags="true" placeholder="Search users or enter player name">
{{$item.username || $item.name}}
</ui-select-match>
<ui-select-choices
refresh="refreshUserSearch($select.search, $select)"
refresh-delay="150"
repeat="user in userSearchResults">
<span bind-html-unsafe="user.name |typeaheadHighlight: $select.search"></span>
(<span bind-html-unsafe="(user.username |typeaheadHighlight: $select.search) ||'non-user player'"></span>)
</ui-select-choices>
</ui-select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment