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 open/close triggers multiple needless re-mounts/unmounts of tray contents #1315

Closed
aaronshaf opened this issue Oct 11, 2023 · 1 comment

Comments

@aaronshaf
Copy link
Member

Background Information

Package Version(s):
ui-tray 8.45.0

Browser:
Chrome

Component:
Tray

Describe the Bug

When a 's open is prop toggled from false to true, the inner contents are unmounted then mounted twice. It renders and mounts a trivial component a total of three times. This should only happen once.

LIkewise, when open is toggled from true to false, the inner contents are unmounted, then re-mounted, then unmounted again. This should only happen once.

Steps To Reproduce

Reproduced here:

https://codesandbox.io/s/ecstatic-river-lh3px3

See the console in codesandbox

Expected Behavior

Trivial component should only mount once upon Tray toggling from closed to open.

Trivial component should only unmount once upon Tray toggling from open to closed.

Products Affected:

Canvas. Perf. If using data hooks to load data in contents of Tray, can sometimes trigger multiple needless data fetches.

Requested Priority:

High

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants