fix(ResponsiveAction): resolve warning about accessing reserved 'key' prop#892
Merged
nicolethoen merged 1 commit intopatternfly:mainfrom Mar 27, 2026
Conversation
… prop Fixes patternfly#890 The ResponsiveAction component was incorrectly defining 'key' as a prop in its interface, which caused React to warn when developers used the standard key prop pattern with arrays of ResponsiveAction components. Changes: - Removed 'key' from ResponsiveActionProps interface since 'key' is a reserved React prop that cannot be accessed within components - Updated ResponsiveActions to use child.key instead of child.props.key to access React's internal key value without triggering warnings Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
nicolethoen
approved these changes
Mar 27, 2026
|
🎉 This PR is included in version 6.4.0-prerelease.16 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
keyprop fromResponsiveActionPropsinterfaceResponsiveActionsto usechild.keyinstead ofchild.props.keyDetails
The
ResponsiveActioncomponent was incorrectly definingkeyas a prop in its interface, which caused React to warn when developers used the standardkeyprop pattern with arrays ofResponsiveActioncomponents:Changes:
key?: string;from theResponsiveActionPropsinterface sincekeyis a reserved React prop that cannot be accessed within componentschild.key(React's internal key accessor) instead of destructuring fromchild.props, which was triggering the warningTest plan
🤖 Generated with Claude Code