Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-menu] Update MenuItemGroup to retain state when isToggled prop is used #2046

Merged
merged 7 commits into from
Feb 26, 2024

Conversation

nikhitasharma
Copy link
Contributor

@nikhitasharma nikhitasharma commented Feb 23, 2024

Summary

What was changed:

  • Updated MenuItemGroup to retain state when isToggled prop is used.
  • Added new test to make sure selection state works in single select menu after closing and re-opening.

Why it was changed:
The Terra-Menu component needs to be updated to retaining selected state for single select menu after the menu is closed and re-opened. Currently, the single select examples and tests which use isToggled prop do not retain selected state because of a missing condition and only using isSelected prop works .

Note:
Since Menu docs show that isSelected prop will soon be deprecated, we need to make this change to retain selection state using isToggled as well.

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:

UXPLATFORM-10186


Thank you for contributing to Terra.
@cerner/terra

@nikhitasharma nikhitasharma changed the title Update MenuItemGroup to retain state when isToggled is used [terra-menu] Update MenuItemGroup to retain state when isToggled prop is used Feb 23, 2024
packages/terra-framework-docs/CHANGELOG.md Outdated Show resolved Hide resolved
@nikhitasharma
Copy link
Contributor Author

The WDIO failures are not related to this change.

@chrismichalewicz
Copy link

@nikhitasharma This has been functionally reviewed. Looks good!

@nikhitasharma nikhitasharma merged commit 6a60312 into main Feb 26, 2024
22 checks passed
@nikhitasharma nikhitasharma deleted the retain-terra-menu-state branch February 26, 2024 19:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants