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
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.
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:
valueattribute (but this is only mentioned in the doc for thevalueattribute, as "The value for this input").valueattribute (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.valueattribute (doc "Overriden from Polymer.IronFormElementBehavior"), but it's actually the "checked" attribute that the data should be bound to.selectedattribute for the selected value (viaattr-for-selectedif needed), but then ifmultiis set you have to bind toselected-valuesinstead. 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?