Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default value of "attrForSelected" in "paper-radio-group" causes troubles in iron-form.serialize() #58

Open
zaclummys opened this issue Mar 30, 2016 · 0 comments

Comments

@zaclummys
Copy link

Description

iron-form doesn't serialize paper-radio-group correctly, since the default value to attrForSelected is name and to paper-radio-group says that you need to change this attribute for all its children.

Why?

The function serialize uses name attribute as its key. But paper-radio-group's children must have the same key for all its children. If not, which would be the point to use them in group?

How it'd be

Changing attrForSelected: { type: String, value: 'name' } to attrForSelected: { type: String, value: 'value' }, then serialize won't return {"letter-a": "on"}, it'll {"letter": "letter-a"}

Example

<paper-radio-group selected="letter-a">
    <paper-radio-button name="letter" value="letter-a">a</paper-radio-button>
    <paper-radio-button name="letter" value="letter-b">b</paper-radio-button>
    <paper-radio-button name="letter" value="letter-c">c</paper-radio-button>
</paper-radio-group>

Unfortunately, it's necessary repeating name attribute in the elements of same group.

@zaclummys zaclummys changed the title The default value of "attrForSelected" in "paper-radio-group" cause trouble "serialize" in "iron-form" The default value of "attrForSelected" in "paper-radio-group" causes trouble "serialize" in "iron-form" Mar 30, 2016
@zaclummys zaclummys changed the title The default value of "attrForSelected" in "paper-radio-group" causes trouble "serialize" in "iron-form" The default value of "attrForSelected" in "paper-radio-group" causes troubles in "serialize" in "iron-form" Mar 30, 2016
@zaclummys zaclummys changed the title The default value of "attrForSelected" in "paper-radio-group" causes troubles in "serialize" in "iron-form" The default value of "attrForSelected" in "paper-radio-group" causes troubles in iron-form.serialize() Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants