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

Tray close still triggers needless re-mounts/unmounts of tray contents #1341

Closed
aaronshaf opened this issue Oct 28, 2023 · 3 comments
Closed

Comments

@aaronshaf
Copy link
Member

Background Information

Package Version(s):
8.46.1

Browser:
Chrome

Component:
Tray

Describe the Bug

When a Tray's open prop is toggled from true to false, the inner contents are unmounted, then re-mounted, then unmounted again. It should only unmount without re-mounting.

Steps To Reproduce

Go here and inspect the console: https://codesandbox.io/s/charming-forest-d58zr4

Open, then close the tray.

Screenshots

image

Requested Priority:
High. It affects our use of React/TanStack Query.

@aaronshaf
Copy link
Member Author

This used to be a problem on upon opening a tray, but that was previously resolved, cf. #1315

@aaronshaf aaronshaf changed the title Tray close still triggers needless re-mounts/unmouns of tray contents Tray close still triggers needless re-mounts/unmounts of tray contents Oct 28, 2023
@aaronshaf
Copy link
Member Author

This is a big deal because of refetchOnMount in TanStack Query
https://tanstack.com/query/v4/docs/react/reference/useQuery

@balzss
Copy link
Contributor

balzss commented Oct 30, 2023

fix is in #1342

@balzss balzss closed this as completed Nov 6, 2023
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

No branches or pull requests

2 participants