Hi,
I am using the 'paper-dropdown-menu' and return the selected menu item
value back to server by calling req.body.category.
<paper-dropdown-menu name="category" label="Category" required>
<paper-menu attr-for-selected="value" class="dropdown-content">
<paper-item value="Entertainment">Entertainment</paper-item>
<paper-item value="News">News</paper-item>
<paper-item value="Technology">Technology</paper-item>
<paper-item value="Others">Others</paper-item>
</paper-menu>
</paper-dropdown-menu>
However, I am facing the below problem which the "selectedItemLabel'" does
return the correct selected value of <paper-item>, but getting the "value"
always return 'undefined' result.
var s = document.querySelector('paper-dropdown-menu');
console.log(s.selectedItemLabel); --> OUTPUT 'News' if I select News
console.log(s.value); --> OUTPUT 'undefined'
Further reading the 'value' property from polymer document, it does
mentioned that 'label' is a read only String type and "will always have the
same value as "selectedItemLabel", which is not TRUE for my case as proven
above. Is this a bug or something I did wrong inside my code. Thanks.
Statement for "value" from Polymer paper-dropdown-menu document:
The value for this element that will be used when submitting in a form. It
is read only, and will always have the same value as selectedItemLabel.
Roger
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/564db10f-0806-48cf-9680-dd25be3a5e90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.