fix: update ToggleGroup examples to properly toggle options#12239
fix: update ToggleGroup examples to properly toggle options#12239nicolethoen merged 1 commit intopatternfly:mainfrom
Conversation
- Update ToggleGroup Single select example to allow toggling off selected options - Update Table Basic example to remove 'Default' option and allow toggling - Update Table Actions example to remove 'Default actions toggle' option and allow toggling - Update Alert Async live region example to remove 'off' option and make single toggle Ensures all ToggleGroup instances follow aria-pressed semantics where clicking a selected option unselects it, and removes redundant 'default' or 'off' options that prevent proper toggle behavior. Fixes patternfly#12234
WalkthroughFour example components are updated to implement proper toggle behavior where clicking a selected option deselects it. Redundant toggle options are removed from alert and table examples, while deselection logic is added to toggle group and table examples. Total changes: 6 lines added, 27 lines removed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview: https://pf-react-pr-12239.surge.sh A11y report: https://pf-react-pr-12239-a11y.surge.sh |
|
@arpanroy41 thank you so much for the contribution!!! 🚀 |
|
@nicolethoen @thatblindgeye Most Welcome. Being a part of Red Hat and a daily user of PF, It's just a head start to me |
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
Fixes #12234
Ensures all ToggleGroup instances follow aria-pressed semantics where clicking a selected option unselects it, and removes redundant 'default' or 'off' options that prevent proper toggle behavior.
Summary by CodeRabbit
Release Notes