Re: [polymer-dev] where can i find a list of "on-events"?

2016-02-11 Thread 'Arthur Evans' via Polymer
If you're using a paper-menu (or a paper-listbox) inside a
paper-dropdown-menu as shown in the example on the paper-dropdown-menu
docs, then the paper-menu fires an iron-select event when the selected item
changes (
https://elements.polymer-project.org/elements/paper-menu#event-iron-select).
The paper-dropdown-menu fires events when it's opened or closed.

Here's a bin showing listening to the iron-select event:

http://jsbin.com/juvojec/edit?html,console,output

So we're clear, there's no list of on- event attributes. Polymer supports
this as a general pattern. on- adds an event listener for
. That event name can be a standard DOM event like click
, a Polymer gesture
event like tap
,
or an element-specific event like iron-select.

As Karl said, any property with notify: true also generates an event. You
could also listen for _those_ with on-, like,
on-value-changed, on-selected-item-label-changed, and so on.

The paper-dropdown-menu doc is a little unclear, but the meaning of the 2nd
paragraph is that you can specify any menu element you like (paper-menu,
paper-listbox, or an element of your own). If you create a new element
here, it needs to fire an iron-select event when a new item is selected,
and the event's detail.item should be the selected item.

https://elements.polymer-project.org/elements/paper-dropdown-menu

I'll submit a PR to try and make this part of the API doc a little clearer.

Hope that helps.

On Mon, Feb 8, 2016 at 8:13 PM, Colin Cannon  wrote:

> I am using a paper-dropdown-menu.  I want to fire a custom event when the
> drop down is changed (maybe on-change?). I couldn't find instructions in
> the docs on how to do this.  Anybody know a list of on-events that I can
> use with polymer elements?  I am sure it is in the docs somewhere, but I am
> having no luck finding it.
>
> 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 polymer-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/0fc3e249-6d68-4802-9a55-9ef28110dfe0%40googlegroups.com
> 
> .
> 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 polymer-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CADSbU_zrW_PYVwnCp9V61fHHQCskJdZwvdsN5Z7EHzw0nQcJUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [polymer-dev] where can i find a list of "on-events"?

2016-02-08 Thread dsschnau
You are right Karl that a property requirese `notify: true` to fire 
on-propertyname-changed events.

On Monday, February 8, 2016 at 3:33:27 PM UTC-5, Karl Tiedt wrote:
>
> Ahhh gotcha, that would be the 'on-value-change' or maybe -changed I 
> forget which it is... basically ANY property will fire an on-*-change[d] 
> event, which I believe requires that property to be notify:true (but could 
> be wrong).
>
> -Karl Tiedt
>
> On Mon, Feb 8, 2016 at 12:23 PM, Colin Cannon  > wrote:
>
>> Hi Karl, thanks for the reply.  I did see those events listed, but I am 
>> looking for something like an on-change event to fire when the selected 
>> value of the drop down changes.  For instance, right now as a test I have:
>>
>> on-click="_test"
>>
>> as an attribute in my paper-dropdown-menu element, and that is not listed 
>> anywhere on that doc page, but it does fire an event when clicked.  
>>
>> *maybe I should have asked for on-event attributes
>>
>> On Monday, February 8, 2016 at 12:16:43 PM UTC-8, Karl Tiedt wrote:
>>>
>>> Like the ones listed here? 
>>> https://elements.polymer-project.org/elements/paper-dropdown-menu#events
>>>
>>> ;)
>>>
>>> -Karl Tiedt
>>>
>>> On Mon, Feb 8, 2016 at 12:13 PM, Colin Cannon  
>>> wrote:
>>>
 I am using a paper-dropdown-menu.  I want to fire a custom event when 
 the drop down is changed (maybe on-change?). I couldn't find instructions 
 in the docs on how to do this.  Anybody know a list of on-events that I 
 can 
 use with polymer elements?  I am sure it is in the docs somewhere, but I 
 am 
 having no luck finding it.

 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 polymer-dev...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/polymer-dev/0fc3e249-6d68-4802-9a55-9ef28110dfe0%40googlegroups.com
  
 
 .
 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 polymer-dev...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/polymer-dev/4ce5e232-d392-4599-86fe-10c9644a9dde%40googlegroups.com
>>  
>> 
>> .
>>
>> 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 polymer-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/aa6d2f79-1b17-4520-a8d2-4cd5a0226c2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [polymer-dev] where can i find a list of "on-events"?

2016-02-08 Thread Karl Tiedt
Ahhh gotcha, that would be the 'on-value-change' or maybe -changed I forget
which it is... basically ANY property will fire an on-*-change[d] event,
which I believe requires that property to be notify:true (but could be
wrong).

-Karl Tiedt

On Mon, Feb 8, 2016 at 12:23 PM, Colin Cannon  wrote:

> Hi Karl, thanks for the reply.  I did see those events listed, but I am
> looking for something like an on-change event to fire when the selected
> value of the drop down changes.  For instance, right now as a test I have:
>
> on-click="_test"
>
> as an attribute in my paper-dropdown-menu element, and that is not listed
> anywhere on that doc page, but it does fire an event when clicked.
>
> *maybe I should have asked for on-event attributes
>
> On Monday, February 8, 2016 at 12:16:43 PM UTC-8, Karl Tiedt wrote:
>>
>> Like the ones listed here?
>> https://elements.polymer-project.org/elements/paper-dropdown-menu#events
>>
>> ;)
>>
>> -Karl Tiedt
>>
>> On Mon, Feb 8, 2016 at 12:13 PM, Colin Cannon  wrote:
>>
>>> I am using a paper-dropdown-menu.  I want to fire a custom event when
>>> the drop down is changed (maybe on-change?). I couldn't find instructions
>>> in the docs on how to do this.  Anybody know a list of on-events that I can
>>> use with polymer elements?  I am sure it is in the docs somewhere, but I am
>>> having no luck finding it.
>>>
>>> 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 polymer-dev...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/polymer-dev/0fc3e249-6d68-4802-9a55-9ef28110dfe0%40googlegroups.com
>>> 
>>> .
>>> 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 polymer-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/4ce5e232-d392-4599-86fe-10c9644a9dde%40googlegroups.com
> 
> .
>
> 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 polymer-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CADNgbTF6XNtt%3Daq%2ByZvp21Ci5FBv%2BxUCx__zRt-Hau2_n84nYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [polymer-dev] where can i find a list of "on-events"?

2016-02-08 Thread Colin Cannon
Hi Karl, thanks for the reply.  I did see those events listed, but I am 
looking for something like an on-change event to fire when the selected 
value of the drop down changes.  For instance, right now as a test I have:

on-click="_test"

as an attribute in my paper-dropdown-menu element, and that is not listed 
anywhere on that doc page, but it does fire an event when clicked.  

*maybe I should have asked for on-event attributes

On Monday, February 8, 2016 at 12:16:43 PM UTC-8, Karl Tiedt wrote:
>
> Like the ones listed here? 
> https://elements.polymer-project.org/elements/paper-dropdown-menu#events
>
> ;)
>
> -Karl Tiedt
>
> On Mon, Feb 8, 2016 at 12:13 PM, Colin Cannon  > wrote:
>
>> I am using a paper-dropdown-menu.  I want to fire a custom event when the 
>> drop down is changed (maybe on-change?). I couldn't find instructions in 
>> the docs on how to do this.  Anybody know a list of on-events that I can 
>> use with polymer elements?  I am sure it is in the docs somewhere, but I am 
>> having no luck finding it.
>>
>> 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 polymer-dev...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/polymer-dev/0fc3e249-6d68-4802-9a55-9ef28110dfe0%40googlegroups.com
>>  
>> 
>> .
>> 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 polymer-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/4ce5e232-d392-4599-86fe-10c9644a9dde%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [polymer-dev] where can i find a list of "on-events"?

2016-02-08 Thread Karl Tiedt
Like the ones listed here?
https://elements.polymer-project.org/elements/paper-dropdown-menu#events

;)

-Karl Tiedt

On Mon, Feb 8, 2016 at 12:13 PM, Colin Cannon  wrote:

> I am using a paper-dropdown-menu.  I want to fire a custom event when the
> drop down is changed (maybe on-change?). I couldn't find instructions in
> the docs on how to do this.  Anybody know a list of on-events that I can
> use with polymer elements?  I am sure it is in the docs somewhere, but I am
> having no luck finding it.
>
> 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 polymer-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/0fc3e249-6d68-4802-9a55-9ef28110dfe0%40googlegroups.com
> 
> .
> 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 polymer-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CADNgbTFGRr8HoSDjHGzY5rfmjXrwRwQyRxj2sZYRyS46a17Vag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.