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

useMenuItem access key prop causes Warning:MenuItem: key is not a prop #1234

Closed
Tatametheus opened this issue Nov 5, 2020 · 2 comments
Closed

Comments

@Tatametheus
Copy link

🐛 Bug Report

Item uses key from props, but causing warning under StrictMode.

🤔 Expected Behavior

😯 Current Behavior

Warning: MenuItem: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop.

💁 Possible Solution

🔦 Context

💻 Code Sample

🌍 Your Environment

Software Version(s)
react-spectrum
Browser
Operating System

🧢 Your Company/Team

🕷 Tracking Issue (optional)

@snowystinger
Copy link
Member

Umbrella issue for strict mode: #779

@Tatametheus
Copy link
Author

looks like I used it a wrong way with ts. After, checking the codes from spectrum. I fixed the problem. Thanks.

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

No branches or pull requests

2 participants