PolymerElements / paper-dropdown-menu

A Material Design browser select element
https://www.webcomponents.org/element/PolymerElements/paper-dropdown-menu
61 stars 107 forks source link

Update validate after change element #111

Open SergioGeeK7 opened 8 years ago

SergioGeeK7 commented 8 years ago

Hello.

I have a form and after submitting show this

http://i.imgur.com/uM9zgto.png

when I completed the filds of the form the select doesn't update , he continues like invalid input for the drop down.

http://i.imgur.com/X0FWGoH.png

I think we should add a auto-validate property like input-paper . meanwhile I have add a code after changed event is fired

http://i.imgur.com/zbbtOdz.png

cdata commented 8 years ago

If I understand this correctly, you are proposing that we add an attribute to auto-validate the paper-dropdown-menu when the value changes?

SergioGeeK7 commented 8 years ago

mmmmm so so, I mean if we add auto-validate property to the paper-dropdown-menu this will auto-validate when the value change, this will avoid the red line under the drop-down-menu after submitting one wrong time

hormesiel commented 8 years ago

Adding an auto-validate attribute like paper-input already has would be a great idea imo. This way if the form is validated and the dropdown has no value selected, it goes red like it currently does, but if I select a value I except it to switch back from error to normal state without having to resubmit the form or to manually call dropdown.validate(), which isn't the case currently. Hence the auto-validate attribute.

nathancassano commented 8 years ago

Had the same issue except I wanted to add that the this.fire('change') is not firing off when the selection is changed.

mercmobily commented 7 years ago

I just got bitten by this one too. Changing the select doesn't re-validate, which creates buggy forms -- or, forces developers to run validate() manually

mercmobily commented 7 years ago

I fixed this issue in #207 . @flawyte In the meantime, feel free to monkey patch it -- that's what I did in https://github.com/mercmobily/hot-polymer-monkey ...