Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix(typeahead): use $setViewValue on blur #5769

Closed
wants to merge 1 commit into from
Closed

fix(typeahead): use $setViewValue on blur #5769

wants to merge 1 commit into from

Conversation

pdesgarets
Copy link
Contributor

On blur, use $setViewValue instead of setting directly $viewValue to '', to make new value go through $validators.
Especially useful when required directive is used.

May fix #5694 (I'm not sure I have understood what was your problem, @sv311 ); updated plnkr : http://plnkr.co/edit/tNrdiMzI9zCeMdrRSSS9?p=preview

Use $setViewValue instead of setting directly $viewValue to '', to make new value go through validators.
@wesleycho
Copy link
Contributor

This LGTM - setting the view value directly may have been a result of some legacy code.

@wesleycho wesleycho added this to the 1.3.2 milestone Apr 7, 2016
@wesleycho wesleycho closed this in bba3f27 Apr 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

typeahead-editable, typeahead-min-length and required validation are not syncing with each other
2 participants