Skip to content
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: React inert prop compatibility #7519

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

chirokas
Copy link
Contributor

Closes #7502

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

packages/@react-aria/utils/src/inertValue.ts Outdated Show resolved Hide resolved
packages/@react-aria/utils/src/inertValue.ts Outdated Show resolved Hide resolved
return !!value;
}
// compatibility with React < 19
return value ? 'true' : undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this line actually be this?

Suggested change
return value ? 'true' : undefined;
if value == undefined {
return undefined;
}
return value ? 'true' : 'false';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is also how we handled it before. See facebook/react#17157 for more details about the behavior of the inert attribute in React < 19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RAC] TabPanel shouldForceMount logs React error
3 participants