-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(tabs): corrected inert value for true condition #3978
Conversation
🦋 Changeset detectedLatest commit: d2af1be The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
@ShrinidhiUpadhyaya is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThis pull request introduces changes to the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (2)
.changeset/twelve-papayas-clean.md (1)
1-5
: Enhance the changeset description for better documentation.While the changeset correctly specifies a patch bump, the description could be more detailed to help future maintainers understand the changes. Consider expanding it to:
--- "@nextui-org/tabs": patch --- -revise the inert attribute in `TabPanel` (#3972) +fix(tabs): correct inert attribute handling in TabPanel (#3972) + +- Fix development mode error when destroyInactiveTabPanel is false +- Change inert attribute from "true" to empty string for inactive tabs +- Align with similar fix from Calendar component (#3054)packages/components/tabs/src/tab-panel.tsx (1)
71-71
: Consider updating data-inert attribute for consistencyThe
data-inert
attribute still uses"true"
string while the actualinert
attribute has been updated to use an empty string. Consider updating this for consistency.- data-inert={!isSelected ? "true" : undefined} + data-inert={!isSelected ? "" : undefined}
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
.changeset/twelve-papayas-clean.md
(1 hunks)packages/components/tabs/src/tab-panel.tsx
(1 hunks)
🔇 Additional comments (1)
packages/components/tabs/src/tab-panel.tsx (1)
72-73
: LGTM: Clear documentation of browser behavior
The comments effectively explain the purpose of the inert
attribute and document the future changes needed for React 19 compatibility.
Closes #3972
📝 Description
inert=""
and to false wheninert=undefined
. A similar fix was done inCalendar
fix(date-picker): corrected inert value for true condition #3054 .inert
was added to tabs in this pr feat(tabs): adddestroyInactiveTabPanel
prop for Tabs component #2973⛳️ Current behavior (updates)
inert={!isSelected ? "true" : undefined}
🚀 New behavior
inert={!isSelected ? "" : undefined}
💣 Is this a breaking change (Yes/No):
📝 Additional Information
Summary by CodeRabbit
TabPanel
component by modifying the handling of theinert
attribute, enhancing user experience during tab navigation.