paper-dropdown (now known as paper-dropdown-menu) has the `selected`, and
`selectedItem` property similar to core-selector. You can bind to those to
get and set the selected item.

On Wed, Sep 17, 2014 at 3:51 PM, Jeff S <[email protected]> wrote:

> 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!
>
>
> On Monday, September 15, 2014 4:35:39 PM UTC-6, arthure wrote:
>>
>> One note, here -- these elements are really new and may still be in flux
>> -- in particular, I believe paper-dropdown has been renamed to
>> paper-dropdown-menu in master. Core-dropdown appears to still be
>> core-dropdown.
>> Thanks,
>> Arthur
>>
>>
>> On Mon, Sep 15, 2014 at 11:49 AM, Matthew Butler <[email protected]>
>> wrote:
>>
>>> This now exists as:
>>>
>>> http://www.polymer-project.org/docs/elements/paper-
>>> elements.html#paper-dropdown (paper)
>>> http://www.polymer-project.org/docs/elements/core-
>>> elements.html#core-dropdown (core)
>>>
>>> Matt
>>>
>>>
>>> On Monday, September 15, 2014 3:47:50 PM UTC-3, [email protected]
>>> wrote:
>>>>
>>>> Is this still planned?
>>>>
>>>> On Friday, July 18, 2014 4:47:51 PM UTC-5, Scott Miles wrote:
>>>>>
>>>>> We plan to construct something like this relatively soon (probably
>>>>> measured in weeks).
>>>>>
>>>>>
>>>>> On Thu, Jul 17, 2014 at 12:16 PM, 'Rob Dodson' via Polymer <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> To my knowledge, there's no paper/core select element
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 17, 2014 at 11:12 AM, Matthew Butler <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Folks,
>>>>>>>
>>>>>>> I was wondering if there's a pre-made paper version of
>>>>>>> select/option? Currently I know there is paper-menu-button which is 
>>>>>>> half of
>>>>>>> what I'm look for. But rather than a fixed icon, I want the displayed
>>>>>>> 'label' to change to the selected option/menu button. I want to avoid
>>>>>>> core-selector, as I don't want all options displayed all the time, just 
>>>>>>> the
>>>>>>> currently selected option. I'm sure I could create my own version with 
>>>>>>> some
>>>>>>> work but just wanted to see if there was something I may be missing.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Matt
>>>>>>>
>>>>>>> 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/6638c77e-ea12-
>>>>>>> 4598-85f2-69edc8585478%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/polymer-dev/6638c77e-ea12-4598-85f2-69edc8585478%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>  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/CAJj5OwBzXDhrvp-WhkzpdOMpCwgJKv4%3DPEDP1nmKj
>>>>>> ZjD82jU%2Bw%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/polymer-dev/CAJj5OwBzXDhrvp-WhkzpdOMpCwgJKv4%3DPEDP1nmKjZjD82jU%2Bw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>  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/967d09ce-01df-4eb0-aee1-4793134fa701%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/polymer-dev/967d09ce-01df-4eb0-aee1-4793134fa701%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  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/5579114b-76a3-4208-bd2c-12bd31f534a6%40googlegroups.com
> <https://groups.google.com/d/msgid/polymer-dev/5579114b-76a3-4208-bd2c-12bd31f534a6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

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/CAHk1xZ%2BvvfPGfPkHONdY5eoONPWQ9xHrpCivYxGVLuupZ3-M4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to