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

Bug - ExpandableSection - Uncaught exception on unmount #10410

Closed
christianvogt opened this issue May 21, 2024 · 0 comments · Fixed by #10659 or #10717
Closed

Bug - ExpandableSection - Uncaught exception on unmount #10410

christianvogt opened this issue May 21, 2024 · 0 comments · Fixed by #10659 or #10717
Assignees
Labels
Milestone

Comments

@christianvogt
Copy link
Contributor

Describe the problem
Component: ExpandableSection
Requires property variant="truncate" in order to invoke the offending code.

Component throws an uncaught exception when mounting and unmounting quickly or after a resize event that schedules the resize callback handler.

Error:
Cannot destructure property 'offsetWidth' of 'this.expandableContentRef.current' as it is null.

This issue was first observed in our automated tests which performs UI actions quickly.

How do you reproduce the problem?
codesandbox demonstrating the problem.

  • Render an ExpandableSection with variant="truncate"
  • Unmount the component within <250ms of rendering.
  • Or unmount within <250ms of a resize event.

Expected behavior
No exception should occur. Component should clean up any scheduled callbacks when the component is unmounted.

Is this issue blocking you?
Yes it is blocking our automated tests.

Work around is to disable our tests that use this component.

What is your environment?

  • OS: macos
  • Browser: Chrome
  • Version: 125

What is your product and what release date are you targeting?
RHOAI 2.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment