Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
The switch animation is trigged by the
onCheckChange
rather than the passed in state withchecked
. The problem here is the animation is presuming you want to change the state. If you don't change the state you get a case where the switch is in the checked false position with the colours following the checked true state.It is due to to this:
The work around is to not pass in
onCheckedChange
and manage state from a normalonClick
. So this may be intentional and by design. However it seems like 2 sources of truth if the animation isn't following the switcheschecked
variable.