-
-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(toggleswitch): disable + checked state and deprecated html event replacement #987
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
aea21c2
to
f65d382
Compare
f65d382
to
796c795
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #987 +/- ##
==========================================
- Coverage 99.54% 93.46% -6.09%
==========================================
Files 163 182 +19
Lines 6621 7896 +1275
Branches 401 440 +39
==========================================
+ Hits 6591 7380 +789
- Misses 30 516 +486
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we take into account throttling? Or this does not cause any issues in this case, if u simply press and hold a button.
This commit fixes the state for disable + enabled ToggleSwitch and also replaces the deprecated onKeyPress with onKeyDown fix themesberg#986
3d0185e
to
3f879e7
Compare
…replacement (themesberg#987) * docs: add disabled+active toggleswitch example * fix(toggleswitch): fix state and replace onkeypress with onkeyup This commit fixes the state for disable + enabled ToggleSwitch and also replaces the deprecated onKeyPress with onKeyDown fix themesberg#986 * fix(toggleswitch): remove unused event * refactor(toggleswitch): remove dead code
As described in issue #986 the component
ToggleSwitch
wasn't acting as expected whenchecked={true} disabled={true}
. This PR fixes the issue. This also replaces the deprecatedonKeyPress
API withonKeyDown
.Fixes #986
onKeyPress
withonKeyDown
. It should not break anything, since the API is only internally used.