Skip to content

fire input to listen to it #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fire input to listen to it #15

wants to merge 1 commit into from

Conversation

nylki
Copy link

@nylki nylki commented Jan 3, 2016

So far it's not possible to listenon-input or on-change once a color change happens. This would allow following scenario:

      <template is="dom-repeat" items="{{lights}}">
        <paper-color-input on-input="lightChange" value={{XYToRGBString(item.state)}} shape="huebox" label="{{item.name}}"></paper-color-input>
      </template>
app.lightChange = (event) => console.log(event.currentTarget.value)

It might be better to retarget/let the event be fired by the paper-color-input instead, so you don't have to pick the correct element from the event object (event.currentTarget).

So far it's not possible to listen`on-input` or `on-change` once a color change happens. This would allow following scenario
```
      <template is="dom-repeat" items="{{lights}}">
        <paper-color-input on-input="handleInput" value={{XYToRGBString(item.state)}} shape="huebox" label="{{item.name}}"></paper-color-input>
      </template>
```

    </template>
@nylki
Copy link
Author

nylki commented Jan 3, 2016

Hm, strangely this doesn't seem to work in Chrome, although it does in Firefox. Some bubbling issues?

@nylki
Copy link
Author

nylki commented Jan 3, 2016

Okay, am now using on-iron-overlay-closed to register listeners when the overlay closed, which also fires when you press cancel. A proper change event would be appreciated, unless there is already a differently named one, which is not documented :)

@WayneKeenan
Copy link

+1 for a change event and a demo of it's use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants