Closed sibijohn72 closed 7 years ago
Thanks, will investigate.
@sibijohn72, could you provide some code? It would be nice to see on using of the component and your config for it at environment.js
if it exists.
Btw, for me, it works well on 2.10.
I can reproduce in 2.11. The problem seems to be that this component incorrectly call the onToggle
function on init, causing the dread"Assertion Failed: You modified "v1" twice on <dummy@controller:application::ember294> in a single render
.
I'm investigating a fix.
@cibernox, could you provide the code as well? Let us know how do you actually use the x-toggle
component, please :)
@lancedikson No need. The very test suite is a good example of the bug: https://travis-ci.org/knownasilya/ember-cli-toggle/jobs/196596235
What's the status of this issue? I've tried using it with ember-cli 2.11.1
, and I see no widget on a page when I use the component (no errors in console though).
Did you try version 3.0?
@knownasilya yes, the latest one available on npm.
It turned out, that the default theme works fine
{{x-toggle
value=myValue
showLabels=true
onLabel='Enabled::true'
offLabel='Disabled::false'
onToggle=(mut myValue)
}}
but then, as soon as I specify a non-default theme
attribute, the widget renders only labels, without the control.
You must opt into other themes, see the configuration section in the readme.
It simply doesnt work in 2.10. I tried to set up a minimal toggle button in a new project but nothing happens to the button when i click. It does not toggle.