-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[autocomplete] Where is the debug mode in v5 #27837
Comments
See #23377 for all the context |
Having open={true} itself doesn't achieve what the debug mode achieved though. https://material-ui.com/api/autocomplete/
I am not trying to inspect the code with popups as I can trigger debugger to freeze the JavaScript Execution to do that. I just want the popup to ignore the blur event if the input is filled. Having open={true} means I will now have to go through all other additional event listeners like ESC, clicking outside of both Tooltip and Options list to manually change the state, to replicate what the code previously did with not passing open prop, only to have the following functionality: the popup will ignore the blur event if the input is filled. I agree that the naming of "debug" is bad, but I don't see why this was removed for the single reason of having a better debugging tools nowadays as there are legitimate cases that benefit from having this prop. |
I have just faced the same issue. I need to debug the Autocomplete for #27340 (comment) but I can't. Nor the reproduces the same outcome as the |
@oliviertassinari Can we change the status of the issue, or should this be still remaining as closed? |
@ryank425 Note that this prop was never meant to be enabled in production. We were probably missing a |
@oliviertassinari Ok, then will Material UI never support any prop that will do following? "the popup will ignore the blur event if the input is filled". Since this is an internal behavior of the library, I don't see how I can leave it open except for manually setting open to true and overriding all other escape behaviors to trigger open to false in the Autocomplete. |
@ryank425 Then it's a completely different discussion, see |
Summary 💡
I am using AutoComplete to list options that match with the query with custom renderOptions function, and have Tooltip on top of those options. I also have some interactions on Tooltip that allow me to drag components to others using React-dnd.
The only way to achieve this is by
to the top of JSX that goes into our tooltip title={...}
Only having two of them set, I can actually drag stuff from the tooltip.
Having onMouseDown to not stopPropagation would result in making all elements to be non draggable.
Having no debug prop on AutoComplete kills any interaction ability as even clicking anything inside tooltip just closes the whole tooltip, not even getting me to the point of dragging.
So, the concern is that I do not see any equivalent option for prop in AutoComplete in v5 version of the documentation. Is there any reason why such function disappeared all of sudden? I really want to try the next version due to some performance issues in v4, but I need this to still work as intended.
Examples 🌈
I don't know if this website is using Material UI components, but the screenshot contains exactly what I want to do in this case. Dragging elements from Tooltip to the outside from AutoComplete options.
Motivation 🔦
The text was updated successfully, but these errors were encountered: