ngOfficeUIFabric / ng-officeuifabric

Office UI Fabric (https://github.com/OfficeDev/office-ui-fabric) implementation for Angular
http://ngOfficeUiFabric.com
MIT License
321 stars 67 forks source link

fix(textfield): $dirty not being set on uif-textfield #408

Closed jjczopek closed 8 years ago

jjczopek commented 8 years ago

Added support for ngModel.$dity & ngModel.$touched for uif-textfield.

Added support for $dirty & $touched properties on uif-textfield by hooking into underlying input element events. This improves experience of using uif-textfield with forms.

Closes #367

coveralls commented 8 years ago

Coverage Status

Changes Unknown when pulling ec0ac61e1dbf6a5367c299a31f758ce2ce9e193e on jjczopek:textfield-dirty-change into \ on ngOfficeUIFabric:dev**.

andrewconnell commented 8 years ago

While all tests are passing, when I look at the demo page, It's not working as expected for some scenarios (with the underline 'uif-underlined' view & label) & I'm seeing a lot of console errors:

angular.js:13920 TypeError: Cannot read property '$setDirty' of null
at m.scope.inputChange (textFieldDirective.ts:89)

Can you take a look at this before we merge it in?

jjczopek commented 8 years ago

@ac: yeah, on input change I forgot to add a check whether ngModel is actually present thus the errors. Expect fix in couple of minutes.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.003%) to 97.455% when pulling 25bf59fe8a4e4e096c6e775aa4f624a3ee113765 on jjczopek:textfield-dirty-change into efbaf65b794db887109a82ff6afd4b036932a4e1 on ngOfficeUIFabric:dev.