Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Fix: DO-3028 'Maximum update depth...' react error in select #111

Merged
merged 5 commits into from
May 20, 2024

Conversation

krzysztof-causalens
Copy link
Collaborator

Motivation and Context

Issue reported that in some cases Select ends up displaying a 'Maximum update depth...' error.

Reproduced the issue in the internal product but it usually doesn't occur in just local storybook, except when in mobile emulation mode. Research suggested it's likely related to these similar issues:

Some of them seem to be fixed in Downshift v8 or v9 but we're still on v7, didn't want to upgrade now as there's breaking changes to work through and test.

Instead I applied workarounds as suggested in the threads - mainly around memoizing the props produced by the downshift prop getters.

Implementation Description

Any new dependencies Introduced

How Has This Been Tested?

Locally in storybook, after these changes I can't reproduce in mobile emulation mode (except for multiselect for some reason, but that one was not reported as an issue in prod so leaving for now).

Copied over the modified file to internal product, seems to fix the issue there as well.

PR Checklist:

  • I have implemented all requirements? (see JIRA, project documentation).
  • I am not affecting someone else's work, If I am, they are included as a reviewer.
  • I have added relevant tests (unit, integration or regression).
  • I have added comments to all the bits that are hard to follow.
  • I have added/updated Documentation.
  • I have updated the appropriate changelog with a line for my changes.

Screenshots (if appropriate):

Copy link
Contributor

@patricia-causalens patricia-causalens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@krzysztof-causalens krzysztof-causalens merged commit 1d64d6f into master May 20, 2024
2 checks passed
@krzysztof-causalens krzysztof-causalens deleted the DO-3028-react-error-in-select branch May 20, 2024 13:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants