You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
The elements catalog is great, but there's something that would be a useful addition for the form elements (inputs, checkboxes, etc): documentation and examples of how to bind data to each element. This is particularly necessary because the binding attribute is different for almost every element type.
For example:
Binding to paper-input uses the value attribute (but this is only mentioned in the doc for the value attribute, as "The value for this input").
paper-textarea also uses the value attribute (documented briefly as "The value for this element."). It would be useful to mention that this is different from the behaviour with a standard textarea, where the value goes inside the tag rather than as an attribute.
paper-checkbox and paper-toggle-button have a value attribute (doc "Overriden from Polymer.IronFormElementBehavior"), but it's actually the "checked" attribute that the data should be bound to.
paper-listbox uses a selected attribute for the selected value (via attr-for-selected if needed), but then if multi is set you have to bind to selected-values instead. This is documented as "Gets or sets the selected elements. This is used instead of selected when multi is true." but again is hard to find unless you already know where to look.
Maybe each element needs a "Binding" section?
The text was updated successfully, but these errors were encountered:
@hubgit The respective repos of the cited elements might be more fitting of a place for these issues. For instance, the docs you see in the Element Catalog for <paper-input> was generated from the source of <paper-input>. The element catalog parses those documentation comments when the catalog is built.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The elements catalog is great, but there's something that would be a useful addition for the form elements (inputs, checkboxes, etc): documentation and examples of how to bind data to each element. This is particularly necessary because the binding attribute is different for almost every element type.
For example:
value
attribute (but this is only mentioned in the doc for thevalue
attribute, as "The value for this input").value
attribute (documented briefly as "The value for this element."). It would be useful to mention that this is different from the behaviour with a standardtextarea
, where the value goes inside the tag rather than as an attribute.value
attribute (doc "Overriden from Polymer.IronFormElementBehavior"), but it's actually the "checked" attribute that the data should be bound to.selected
attribute for the selected value (viaattr-for-selected
if needed), but then ifmulti
is set you have to bind toselected-values
instead. This is documented as "Gets or sets the selected elements. This is used instead of selected when multi is true." but again is hard to find unless you already know where to look.Maybe each element needs a "Binding" section?
The text was updated successfully, but these errors were encountered: