question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CSS of toggle-component not changing

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Comments:37 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
knownasilyacommented, Jun 21, 2017

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.

0reactions
MarioDiarcommented, Sep 12, 2017

Seems to be working fine now.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found