Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Slider doesn't set form to a dirty state #21

Closed
perry opened this issue Apr 8, 2014 · 4 comments
Closed

Slider doesn't set form to a dirty state #21

perry opened this issue Apr 8, 2014 · 4 comments
Milestone

Comments

@perry
Copy link
Contributor

perry commented Apr 8, 2014

The pristine state on a <form> is only changed when the model is directly changed by the <input>.

We could potentially pass the form object and a field name (this would also require you adding a hidden <input> field with a name attribute to register it in the form) in to the slider and do something like scope.myForm.myField.$setViewValue(scope.myForm.myField.$viewValue); when the ngModel changes - this would handle all of the state changes that a form could have.

Any ideas on a better way to do this?

@drgould
Copy link
Contributor

drgould commented Apr 15, 2014

Seems a bit unnecessary requiring the form to be passed in. I'll see what I can come up with.

@drgould drgould added this to the v0.3 milestone Apr 15, 2014
@drgould
Copy link
Contributor

drgould commented Apr 16, 2014

ngModelController has been implemented in v0.3.0 and the slider sets its state to dirty upon user interaction. Happy sliding!

@drgould drgould closed this as completed Apr 16, 2014
@henrahmagix
Copy link

Thanks @drgould!

@perry
Copy link
Contributor Author

perry commented Apr 17, 2014

Thanks! 🍻

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants