iron-form icon indicating copy to clipboard operation
iron-form copied to clipboard

Expose property to retrieve validatable/submittable elements

Open valdrinkoshi opened this issue 7 years ago • 3 comments
trafficstars

<iron-form> contains all the complex logic of searching for the validatable and submittable elements. It would be really helpful for it to expose a public method/property to retrieve these. @notwaldorf WDYT about making _getValidatableElements & _getSubmittableElements public?

valdrinkoshi avatar Jan 23 '18 01:01 valdrinkoshi

BTW, consider also creating separate helper similar to iron-focusables-helper. This would allow to re-use some logic of iron-form without pulling in the element itself.

web-padawan avatar Jan 23 '18 09:01 web-padawan

I don't have any huge objections to making them public, other that they will become part of the public API, and thus harder to maintain (no breaking changes, etc). Is there a benefit to having them public vs protected, like they are now?

notwaldorf avatar Jan 23 '18 22:01 notwaldorf

@valdrinkoshi What about this type of helper that simulates native form.elements ? (https://github.com/PolymerElements/iron-form/pull/273)

vdegenne avatar May 29 '18 11:05 vdegenne