Paper-dropdown is showing up correctly in polymer.dart but all the versions had to be bumped up. (Poly 14.0 and PE 0.2.0)
I do have a dumb question though and I think this thread is a good home. (If not, I will start a new one.)
In modifying the Polymer Dart Codelab to use paper elements, how do you bind the selected value to the form for submission? Switching an input field was straight forward.
From:
<div class="field">
<textarea placeholder="Add title" value="{{codelab.title}}" on-keyup="{{validateTitle}}"></textarea>
</div>
To:
<div>
<paper-input floatingLabel label="Add title" name="title" style="width: 30%" inputValue="{{codelab.title}}" on-keyup="{{validateTitle}}"></paper-input> </div>
but I am confused on how to switch from the select-option to the paper-dropdown and have the data get submitted.
From:
<div class="field">
<label>Level: </label>
<select value="{{codelab.level}}">
<option template repeat="{{level in allLevels}}">
{{level}}
</option>
</select>
</div>
To: ????? (The dropdown gets properly created but none of the attributes I used would let me bind the chosen value to {{codelab.level}} for form submission.)
<div>
<paper-dropdown label="Level: "> (Note that I tried adding valueattr={{codelab.level}} but that didn't work.)
<template repeat="{{level in allLevels}}">
<paper-item label="{{level}}"></paper-item>
</template>
</paper-dropdown>
</div>
I thought that I may need to use core-selector but there is a core-select event that is part of paper-dropdown. Do I need to recognize that event and somehow set the form value that way? That seems strange to me, especially since paper-input was straight forward but I am new to all this and maybe it isn't so strange after all.
(If I do need to do this, can someone point me in the right direction in terms of 'how'?)
Thanks!