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

Merged
merged 7 commits into from
Jan 15, 2025
Merged

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.

snowystinger
snowystinger previously approved these changes Dec 16, 2024
snowystinger and others added 2 commits January 13, 2025 14:49
# Conflicts:
#	packages/@react-spectrum/s2/src/Tabs.tsx
@snowystinger snowystinger added this pull request to the merge queue Jan 15, 2025
Merged via the queue into adobe:main with commit 55dc352 Jan 15, 2025
30 checks passed
@chirokas chirokas deleted the fix/7502 branch January 16, 2025 07:55
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
4 participants