angularjs - Angular-UI: Force Typeahead results -
i have text field uses angularui's typeahead feature. looks this:
<input typeahead="eye eye in autocomplete[column] | filter:$viewvalue">
i'd force user select option list generated. if type not on list appears, on blur (clicking outside of text field), i'd value of text field reset it's original value.
is functionality part of typeahead directive, or need extend it? searched 10 minutes on google , stackoverflow, couldn't find relevant documentation.
can please point me in right direction accomplish this?
there attribute in plugin force existing values only: typeahead-editable="false"
. default value true
.
only $modelvalue
being set empty when there wrong value selected, , necessary otherwise not able write anything. $viewvalue
stays last text entered. might able bind blur event of own field reset $viewvalue
?
here jsfiddle selected value displayed: http://jsfiddle.net/zjpwe/61/
you use attribute typeahead-on-select
required callback when value selected, not sure work typeahead-editable="false"
because no value being selected.
Comments
Post a Comment