angularjs - Don't show dropdown choices with angular-ui-select before entering data? -


i using angular-ui-select directive create auto-complete input field. want able click , focus field without dropdown options appearing. plunker example in documentation works way, cannot mine behave correctly. please help.

here code:

<ui-select ng-model="customer.selected" theme="bootstrap">     <ui-select-match placeholder="start typing..">{{ $select.selected.family_name }}</ui-select-match>     <ui-select-choices repeat="customer in customers | filter: $select.search">         <div ng-bind-html="trustashtml((customer.family_name | highlight: $select.search))"></div>     </ui-select-choices> </ui-select> 

here plunker example working way to.

http://plnkr.co/edit/a3klk8dkh3wwiiksdsn2?p=preview

i have same issue. want able click , focus field without dropdown options appearing.

here sharing solution. may someone. made changes in selectize theme example in plunker shared @corey quillen. had cleaned other things help.

1) here first had add reset-search-input="false" in ui-select directive. not reset search input.

2) had replaced filter custom filter propsfilter. useing in select2 theme. , put

if(!props.name.length){ return out; }

in filter above if condition. in demo.js file.

so data return empty if no search text entered.

here plunker example of that.