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
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

@github-project-automation github-project-automation bot moved this to Needs triage in PatternFly Issues May 21, 2024
@tlabaj tlabaj moved this from Needs triage to Backlog in PatternFly Issues May 22, 2024
@tlabaj tlabaj modified the milestones: Prioritized Backlog, 2024.Q2 May 22, 2024
@kmcfaul kmcfaul moved this from Backlog to Not started in PatternFly Issues May 22, 2024
@tlabaj tlabaj modified the milestones: Prioritized Backlog, 2024.Q2 Jun 5, 2024
@tlabaj tlabaj moved this from Not started to PR Review in PatternFly Issues Jun 26, 2024
@github-project-automation github-project-automation bot moved this from PR Review to Done in PatternFly Issues Jul 8, 2024
@tlabaj tlabaj reopened this Jul 9, 2024
@github-project-automation github-project-automation bot moved this from Done to Needs triage in PatternFly Issues Jul 9, 2024
@github-project-automation github-project-automation bot moved this from Needs triage to Done in PatternFly Issues Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment