You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hidden checkbox that power the Switch seems to not be in with the Switch isSelected state.
🤔 Expected Behavior?
When the Switch is selected, the hidden checkbox should have the attribute checked="".
When the Switch is not selected, the hidden checkbox should not have the attribute checked="".
😯 Current Behavior
If neither defaultSelected or isSelected are used the checked="" attribute is never added to the hidden checkbox.
If defaultSelected=true the hidden checkbox have the checked="" attribute at first render. But when the Switch is toggle, the checked="" attribute is still present.
Seems like the value is updating under the hood but just not updating in the DOM:
Maybe related to facebook/react#3005. Is this behavior causing any specific issues?
Provide a general summary of the issue here
The hidden checkbox that power the Switch seems to not be in with the Switch
isSelected
state.🤔 Expected Behavior?
When the Switch is selected, the hidden checkbox should have the attribute
checked=""
.When the Switch is not selected, the hidden checkbox should not have the attribute
checked=""
.😯 Current Behavior
If neither
defaultSelected
orisSelected
are used thechecked=""
attribute is never added to the hidden checkbox.If
defaultSelected=true
the hidden checkbox have thechecked=""
attribute at first render. But when the Switch is toggle, thechecked=""
attribute is still present.💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
https://codesandbox.io/p/sandbox/pedantic-snowflake-6sm9h5?workspaceId=ws_3TnnD19dp7Tmr52NkWtSat
You can also try any switch of the documentation page
Version
RAC 1.5.0
React 18 & 19
What browsers are you seeing the problem on?
Other
If other, please specify.
All browsers
What operating system are you using?
Ubuntu
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: