Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Need a .value property which reports actual value, not its label #138

@Typel

Description

@Typel

value property is misleading as it does not report the value of the selected paper-item, but rather its innerHTML (label).

In this scenario:

<paper-dropdown-menu id="test">
<paper-menu class="dropdown-content">
<paper-item value="selectedItemValue">selectedItemLabel</paper-item>
</paper-menu>
</paper-dropdown-menu>

Using this:
document.querySelector('#test').value
Returns:
selectedItemLabel

Given its name, I would have expected the .value property to report the selected paper-item's value (selectedItemValue in the example) rather than its label. It is documented as such, so I assume this is an intentional decision, but shouldn't there be a similar readonly property which actually looks up its value as well? Might I suggest selectedItemValue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions