-
Notifications
You must be signed in to change notification settings - Fork 647
update SelectPanel Multi Select Modal story #7354
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
update SelectPanel Multi Select Modal story #7354
Conversation
🦋 Changeset detectedLatest commit: e5f2b35 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Pull request overview
This PR updates the MultiSelectModal story to implement deferred save behavior, where changes made within the modal are not reflected in the button label until the user explicitly clicks the Save button. Canceling or clicking outside the modal discards any unsaved changes.
Key Changes
- Added
savedSelectionstate to track the committed/saved selection separately from the workingselectedstate - Updated button text to display
savedSelectioninstead of the currentselecteditems, preventing real-time updates while the modal is open - Enhanced
onOpenChangehandler to only updatesavedSelectionwhen the modal closes with gesture type 'selection' (Save button clicked)
Co-authored-by: Copilot <[email protected]>
|
Integration tests skipped; Storybook-only changes in this PR |
liuliu-dev
left a comment
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.
❤️
Update SelectPanel Multi Select Modal story to not update labels unless user saves changes in modal
Closes https://github.com/github/primer/issues/6131
Changelog
Changed
Changes made in SelectPanel Multi Select Modal variant are now no longer reflected in the background via labels until user saves changes in the modal. Canceling or clicking outside the modal will also discard any unsaved changes.
Rollout strategy
Testing & Reviewing
Merge checklist