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

Autcomplete crashes app when used inside a Dialog #3008

Closed
jonasbjoralt opened this issue Aug 15, 2023 · 3 comments
Closed

Autcomplete crashes app when used inside a Dialog #3008

jonasbjoralt opened this issue Aug 15, 2023 · 3 comments
Labels
🐛 bug Something isn't working

Comments

@jonasbjoralt
Copy link

Describe the bug
When using Autocomplete within an EDS Dialog, this gives the following error message:
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

Steps to reproduce the bug

  1. See code below. Run app
  2. Open the Dialog

Sample Code
https://github.com/equinor/tmp-eds-autocomplete-bug (standard create-react-app)

Note that this codesandox with the exact same code works:
https://codesandbox.io/s/thirsty-leakey-v6pmqd?file=/src/App.js

Expected behavior
AutoComplete should work fine. It did work fine in v. 0.31.1 . Upgrading to 0.32.3 introduced the bug.

Specifications

  • Version: 0.32.3
  • Browser: Firefox, Chrome
  • OS: Win 10

Additional context

Add any other context or screenshots about the bug. An example in CodeSandbox is very helpful

@jonasbjoralt jonasbjoralt added the 🐛 bug Something isn't working label Aug 15, 2023
@oddvernes
Copy link
Collaborator

Seems related to #2889 which I just pushed a fix for for the next release. Do you get the error when clicking on an item?

@oddvernes
Copy link
Collaborator

Never mind I tested your create-react-app and it happened instantly when opening dialog. Fortunately it looks like my fix resolved this issue! We'll make a new release of eds-core-react probably today or tomorrow 👍

@jonasbjoralt
Copy link
Author

Great, thanks for the quick resolution! 🙌
Will try again to upgrade tomorrow then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants