-
Notifications
You must be signed in to change notification settings - Fork 561
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
[WIP] Improve programmatic state management of UnderlinePanels #5527
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 92700fc 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 |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
packages/react/src/experimental/UnderlinePanels/UnderlinePanels.tsx
Outdated
Show resolved
Hide resolved
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/358343 |
🟢 golden-jobs completed with status |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
Closes #4575
Changelog
New
onSelect()
prop to bothUnderlinePanels
andUnderlinePanels.Tab
. This allows users to define a function that gets called when a tab is selected.Changed
UnderlinePanels
to handle updates to tabs and panels within auseEffect()
hook. This ensures that the selected tab is updated when thearia-selected
attribute changes, as well as keeping prop data fresh.Removed
Rollout strategy
Testing & Reviewing
onSelect()
function is called when a tab is clicked + the selected tab can be managed programmatically via updating thearia-selected
propMerge checklist