CSS of toggle-component not changing
See original GitHub issueI’m rendering my component with an if like so. The boolean changes via a button.
{{#if myBoolean}} {{my-emberclitoggle-comp}} {{/if}}
And the CSS of the component is not switching to the selected state when clicked, but the value is being changed correctly.
When the component is rendered normally example:
{{my-emberclitoggle-comp}}
the CSS changes fine when clicked.
I also tried by rendering the component via transitionTo and the CSS doesn’t change either.
Here is a reproduction in a vanilla 2.3.0 Ember app. https://github.com/MarioDiar/emberToggle-Bug
Issue Analytics
- State:
- Created 7 years ago
- Comments:37 (13 by maintainers)
Top Results From Across the Web
jQuery toggleClass not changing css - Stack Overflow
I have two CSS classes, .caret and .u-caret . Class caret looks like a triangle pointing down, and class u-caret looks like one...
Read more >Build a React Switch Toggle Component - Upmostly
Learn how to build a React switch component using the native HTML checkbox input! You'll learn plenty about React checkboxes in the process....
Read more >Pure CSS Toggle Buttons as a Web component - GitHub
Pass on any one of the following values for different toggle effects to theme property. slide; move; updown; flip; rotate; fadeout; slideall ...
Read more >Create a Toggle Switch in React as a Reusable Component
Learn how to create an iOS-inspired toggle switch using React components, building a simple demo React App for using this custom toggle ...
Read more >How to build a Tailwind CSS toggle/switch component - Medium
Tailwind CSS toggle/switch component. The first step towards building the toggle component is to set up the basic HTML code: <label for="toggle- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://ember-twiddle.com/77630479fe4e1a7079ef90ec66fe5002?openFiles=templates.application.hbs%2Ctemplates.components.toggle-switch.hbs
There might be a way to remove the
(action )
wrapper, but I don’t have the time to look deeper at the moment.Seems to be working fine now.