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

Issue #5733: MenuPlacer useLayoutEffect depend on isLoading #5736

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

labkey-nicka
Copy link

Fixes #5733. This PR passes the isLoading prop down to the MenuPlacer component and then relies on isLoading as a dependency for running the useLayoutEffect to recompute the position of the menu. Subsequently, getMenuPlacement will recalculate the menu's position.

@changeset-bot
Copy link

changeset-bot bot commented Aug 22, 2023

⚠️ No Changeset found

Latest commit: 6423178

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 22, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6423178:

Sandbox Source
gracious-field-4rxtx4 Issue #5733

@labkey-nicka
Copy link
Author

Hi @Methuselah96, I'd like to put this PR on your radar for approval. Thanks!

@labkey-nicka
Copy link
Author

Hello, is there something more I can do to get a reviewer to take a look at this PR? I see that there isn't much activity on this repository/package. Thanks.

@labkey-nicka
Copy link
Author

Hey there, pinging this PR again in the hopes that someone is able to take a moment to triage/review. I appreciate it.

@@ -317,6 +318,7 @@ export const MenuPlacer = <
) => {
const {
children,
isLoading,
Copy link

Choose a reason for hiding this comment

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

@labkey-nicka I'm not a maintainer but while fixing the same issue I found that you can get the isLoading property from props.selectProps.isLoading. Therefore, we might not need an extra isLoading prop here.

Copy link
Author

Choose a reason for hiding this comment

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

Hey, thanks! Indeed isLoading is available on props.selectProps. Refactored and updated.

@labkey-nicka
Copy link
Author

Should I continue to ping on this or just close it? Is react-select accepting changes?

@thanhpd
Copy link

thanhpd commented Dec 2, 2023

@labkey-nicka The dev team is slow in this aspect. I'd say keep the PR open but do some workaround on your end in the meantime. I've used patch-package or yarn 3 to patch them silently for my projects.

@labkey-nicka
Copy link
Author

Happy 1st Birthday!

@michaelberkhahn
Copy link

michaelberkhahn commented Oct 12, 2024

Is there any update on this? It is an important improvement I would say.

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.

useLayoutEffect of <MenuPlacer /> component should listen for react-select's isLoading prop
3 participants