-
Notifications
You must be signed in to change notification settings - Fork 375
Description
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
ExpandableSectionwithvariant="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
Metadata
Metadata
Assignees
Labels
Type
Projects
Status