javascript - Making sure that the textbox is only filled with a value from a dropdown. -
javascript - Making sure that the textbox is only filled with a value from a dropdown. -
i have textbox populated upon clicking <li>
element in dropdown. dropdown populated ng-repeat
directive on <li>
elements. have model filter <li>
elements on text input.
i want create sure when textbox loses focus, either filled value dropdown or reset default value. (simply no custom values accepted.) other checking value on text box within loop check match in respective list of items. other approaches have using javascript (preferably angular way), , address issue?
(i need ability type on textfield enable filtering of dropdown, , many other reasons think cannot utilize <select>
tag.)
i suggest still utilize select
go angular-ui's ui-select
:
angular-ui ui-select
it's wrapper , angularjs native implementation of select2
javascript html angularjs
Comments
Post a Comment