-
-
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][MenuItem] Multiple invariant violations when navigating away after touchtap #2510
Comments
I'm also getting a setState warning on the AutoComplete component. This happens when It's opened and then close with a clickaway.
I get this error even if I disable all setState() methods associated with the component. Example: Even this triggers the setState warning which leads me to believe it's an issue with the core component, not my code. <AutoComplete
id="fullName"
floatingLabelText="Name"
filter={AutoComplete.fuzzyFilter}
dataSource={names}/><br/> |
I had the same problem with Popover. Tried an ugly hack like setting a timeout but it didn't work. I inspected the source and found that Popover sets a timeout This fixed the problem but caused another when navigating away from the page. This is caused but having
However the popover position is wrong since Popover doesn't check position on initial render. There is an open PR which fixes this. #4839 In the meantime I solved the incorrect positioning by setting a timeout and another state variable after ìsPopoverOpen`. So my
Obviously this causes another re-render but in my case it's acceptable while a permanent fix in core is available. |
Fixed in #4839. |
This seems to have been brought up in #1599 but since nothing happened there I'm opening another issue. Here are the errors:
Here is the code:
When I wrap the
pushState
call in asetTimeout
the issue goes away, so I'm fairly certain that's the problem. I'll use the workaround for now but thought this might help shed some light on the issue.The text was updated successfully, but these errors were encountered: