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 certain directives #361

Closed ghost closed 8 years ago

ghost commented 8 years ago

http://plnkr.co/edit/n642ZGLz8VNgT5RjNO2L?p=preview

When changing the uif-textfield, the $dirty property is not set to true. It IS set to true for the form, but not for the ng-model property bound to the uif-textfield.

Apparently this also occurs at uif-dropdown.

We need to verify this for all components.

ghost commented 8 years ago

The best solution seems to have the name property on the input element. Right now, this attribute is not copied to the input element. We could do this manually, but that's harder to maintain. We could use mergeTemplateAttributes https://github.com/angular/angular.js/blob/master/src/ng/compile.js#L2747 to copy all attributes from the directive to the input element.

We need to do this on all directives.

andrewconnell commented 8 years ago

Instead of a single issue, can we please create seperate issues for each directive? Found using one issue to track all directives was a PITA and a mess in the commit references... also hard to track if someone was already working on one directive as you couldn't tell who was working on one vs. another.

ghost commented 8 years ago

Instead of a single issue, can we please create seperate issues for each directive? Found using one issue to track all directives was a PITA and a mess in the commit references... also hard to track if someone was already working on one directive as you couldn't tell who was working on one vs. another.

I completely agree, but it does not apply to each directive. I don't want to create an issue for each directive, only if it requires an update. I've created two issues for uif-textfield and uif-dropdown, and checked a couple that won't have this issue.

andrewconnell commented 8 years ago

Closing this one as we have seperate issues for each directive that's affected.