Skip to content

Conversation

brandongregoryscott
Copy link
Contributor

@brandongregoryscott brandongregoryscott commented Nov 16, 2021

Overview

Fixes #1354 Combobox position issue
Fixes #1329 Autocomplete 'children' function continuously invoked

The root issue for #1329 was not the ref updates but the useEffect in src/positioner/src/Positioner.js. It was watching dimensions as a dependency while it was using previousDimensions and also calling update, which wasn't wrapped in a useCallback. This should only re-render when those values change. Tested out in storybook using the same console log in the children function as described in #1329

Screenshots (if applicable)

Autocomplete rendering before Positioner change
https://www.loom.com/share/353e9a69b7f744d2816bcdab7aff8dda

Autocomplete rendering after Positioner change
https://www.loom.com/share/6f9963d7966046fdbd579ea2e3565a35

Note that both of these are after the ref changes in Autocomplete and Combobox were reverted, so those are appearing in the correct location.

Combobox positioning (also demoable from Storybook)
image

Autocomplete positioning (also demoable from Storybook)
image

Documentation

  • Updated Typescript types and/or component PropTypes
  • Added / modified component docs
  • Added / modified Storybook stories

@netlify
Copy link

netlify bot commented Nov 16, 2021

✔️ Deploy Preview for evergreen-storybook ready!

🔨 Explore the source changes: 2f65171

🔍 Inspect the deploy log: https://app.netlify.com/sites/evergreen-storybook/deploys/619410e72133fc00072bb3cd

😎 Browse the preview: https://deploy-preview-1362--evergreen-storybook.netlify.app

@brandongregoryscott brandongregoryscott merged commit 47c0f37 into segmentio:master Nov 16, 2021
@brandongregoryscott brandongregoryscott deleted the fix-positioner branch November 16, 2021 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Combobox position issue Autocomplete 'children' function continuously invoked
2 participants