-
-
Notifications
You must be signed in to change notification settings - Fork 422
[collapsible] onOpenChangeComplete #4381
Copy link
Copy link
Open
Labels
component: collapsibleChanges related to the collapsible component.Changes related to the collapsible component.type: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.
Metadata
Metadata
Assignees
Labels
component: collapsibleChanges related to the collapsible component.Changes related to the collapsible component.type: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.
Feature request
Summary
Similar to Dialog and Popover, it would be nice to know when the openChange animation is complete.
Examples in other libraries
Motivation
We set
overflow: hiddenduring animations so scrollbars don't get shown during the animation. This is causing problems for some components that display popovers using absolute positioning from inside the collapsible container. We would use this prop to set an "isAnimating" prop to conditionally apply the styles we want.Besides onOpenChangeComplete, another nicer approach would be if the transitionStatus value (and
data-attributes) could be used to know if an open animation is in-progress. Unfortunately, it seems like transitionStatus is "idle" when the open animation is happening.