yalabot / angular-foundation

http://pineconellc.github.io/angular-foundation/
Other
1.05k stars 266 forks source link

fix(typeahead): Set parse key to valid when selecting exact match #307

Open nthurow opened 8 years ago

nthurow commented 8 years ago

This fixes a bug in typeahead where if you set typeahead-editable="false" and then type an exact match into the typeahead and select it, the parse error key does not get reset, and as a result the form looks invalid. This issue was documented in angular-ui/bootstrap#3166 and fixed in https://github.com/angular-ui/bootstrap/commit/c0a9c707903fa3dfc662887cd348ee2b0bf13f85. I simply ported the exact code and unit test into angular-foundation.