knownasilya / ember-toggle

Checkbox based Toggle Switches for Ember
http://knownasilya.github.io/ember-toggle/
MIT License
112 stars 52 forks source link

Toggle does not switch when clicked on #107

Closed amexaCree closed 6 years ago

amexaCree commented 6 years ago

I installed this add-on to my ember project, however, when the toggle is clicked on it does not switch state. Instead one has to drag the toggle. However this is not how it is on the demo, you can click on it to change state. Is there something I'm missing?

knownasilya commented 6 years ago

Did you setup an action and set the value on action trigger?

amexaCree commented 6 years ago

Sorry not sure what you mean... this is how I used it... {{x-toggle value=testValue theme='material' onToggle=(action (mut testValue))}} my action mutates the value to be toggled. It works if i drag the toggle button but nothing happens if I just click.

knownasilya commented 6 years ago

What version of ember-toggle are you using?

amexaCree commented 6 years ago

v5.2.1

knownasilya commented 6 years ago

By any chance is it in some container that also handles the click?

amexaCree commented 6 years ago

No, the container it is in does not handle the click.

amexaCree commented 6 years ago

Maybe there's some dependencies I need to install..?

amexaCree commented 6 years ago

I'm using it in another component, could that be the issue?

amexaCree commented 6 years ago

Okay, I've discovered the issue. I had the div it was contained in handling another action. I guess it was interfering. I had to get rid of it. Thank you.

knownasilya commented 6 years ago

👍