Option+Click doesn't work with material-ui components: "Couldn't find a React instance for the element"
See original GitHub issueDescribe the bug Option+Right-click works to open the context menu and then go to a selected component.
However, just Option+Click doesn’t do anything despite showing the green border around the hovered element. This appears to only be a problem with material UI styled elements.
To Reproduce
This is a private product, so I can’t share any useful code. However, the problem might be with the fact that we use MaterialUI’s ("@material-ui/core": "^4.12.2",)
makeStyles()
for styling our components. That might mess up the logic for how you’re finding the target component.
Expected behavior It should open the target component’s file in VSCode as desired.
Desktop (please complete the following information):
- OS: MacOS
- Browser Chrome
- Version 101.0.4951.54 (Official Build) (x86_64)
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6
Top Results From Across the Web
on change for Material UI Select component not triggered #322
According to this issue (#275), you should use the onClick event, not the onChange Event, but on reactstrap its not supported right now...
Read more >React testing library on change for Material UI Select component
I grab the element using getByTestId which works great, then set the value of the element and then call fireEvent.change(select); but the ...
Read more >Frequently Asked Questions - Material UI - MUI
Frequently Asked Questions. Stuck on a particular problem? Check some of these common gotchas first in the FAQ. If you still can't find...
Read more >React Box - Material UI - MUI
The Box component wraps your component. It creates a new DOM element, a <div> that by default can be changed with the component...
Read more >React Autocomplete component - Material UI - MUI
The autocomplete is a normal text input enhanced by a panel of suggested options. The widget is useful for setting the value of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same problem, try to replace react.development.js and react-dom.development.js
Don’t use react.production(.min).js or react.profiling(.min).js, use react.development.js