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

$dirty not being set on uif-dropdown #368

Closed ghost closed 8 years ago

ghost commented 8 years ago

Refer to https://github.com/ngOfficeUIFabric/ng-officeuifabric/issues/361 for more information.

andrewconnell commented 8 years ago

See repo: http://plnkr.co/edit/vulKP4uZCmJ6YUiBrwiT?p=preview

jjczopek commented 8 years ago

Actually it seems that $dirty is working correctly for the uif-dropdown. If you add name attribute to the drop-down, it will show up in the JSON output in the plunk. When you change value, $dirty is set properly on the underlying ngModel. However $touched is not set properly. Refer to forked plunk: http://plnkr.co/edit/MQWaFsOi12dVD63O239y?p=preview

I will submit PR soon that takes care of the $touched not being set and adds test cases for both $touched& $dirty being properly set.