angularjs - UISelect Default choice/option -


I have a default option / option (like 'click to do something')

My current UISelect implementation is something like

  & lt; Ui-edi = "select agency" class = "form-control" ng-model = "selected agencies" selected agenda "theme =" selection 2 "on-select =" select from aggregation () "ng-disabled =" disabled "Required Autofocus & gt; & lt; ui-select-match & gt; {{$ select.selected.Name}} ({{$ select.selected.AgencyKey}}) & lt; / ui-select-match & gt; ; & Lt; ui-select-option refresh = "funcAsync ('Agencies', $ Select.search)" Refresh-Delay = "0" Repeat = "Agency in Agencies: Filter: Select $. Search "& gt; & lt; div & gt; {{agency.name}} ({{agency.AgencyKey}}) & lt; / div & gt; & lt; / ui-select-options & gt; & lt; ; / Ui-select & gt;  

I always want to choose an option such as' click on user

  Lt; ui-select id = "select agency" Class = "form-control" ng-model = "selectedAgencies.selectedAgency" topic = "select2" on-select = "onAgencySelected ()" ng-disabled = "disabled" Required autofocus & gt; & lt; ui-select-match & gt; {{$ select.selected.Name}} ({{$ select.selected.AgencyKey}}) & lt; / ui-select-match & gt; & Lt; ui-select-options null-label = "Click to do something" Refresh = "FunkCasink ('Agencies', $ sel Ect.search) "Refresh-Delay =" 0 "Repeat =" Agency in Agencies: Filter: Select $ .search "& gt; & gt; div ng-trim =" false "& gt; {Agency. }} ({{Agency.AgencyKey}}) & lt; / div & gt; & lt; / ui-select-options & gt; & lt; / ui select & gt;  

I am doing this now

   

What do I want to do?

  & lt; Refresh = "0" repeat = "agency in agencies: filter: $ selection" Search. "& Gt; & Lt; Div & gt; {{Agency. Name}} ({{agency.AgencyKey}}) & lt; / Div & gt; & Lt; / Ui-select-options & gt; & Lt; / Ui select & gt;  

This default option is always available for the user, despite filtering.

Note: In a way I can add it to the 'click on data' add option, always as a first item, but I do not want to mess with the source every time the user filters or from the server Trying to bring data.

Appreciate your help.

> & lt; Ui-select ng-model = "address.selected" theme = "bootstrap" ng-disabled = "disabled" reset-search-input = "wrong" style = "width: 300px;" & Gt; & Lt; Ui-select-match placeholder = "Enter address ..." & gt; {{$ Select.selected.formatted_address}} & lt; / Ui-select-match & gt; & Lt; Ui-select-options repeat = "Address by Address $ Index" Refresh = "Refresh Credits ($ select.search)" Fresh-Delay = "0" & ​​gt; & Lt; Div ng-bind-html = "address.formatted_address | highlight: $ select.search" & gt; & Lt; / Div & gt; & Lt; / Ui-select-options & gt;

In fact, this code sees itself with the ui-select GIT repo demo


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -