You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since react-collapsible is calculating the scrollHeight of its children it can pass it through methods like onOpen, or onOpening to let the parent component be aware of that too.
This can be really helpful when height and positioning in parent component matters and developer needs to know the content height without using DOM selectors.
For example for onOpen:
this.setState(({ height: prevHeight }) => {
this.props.onOpen({ height: prevHeight }); // or even just pass it using innerRef.scrollHeight
return ({
height: 'auto',
overflow: this.props.overflowWhenOpen,
inTransition: false,
})
});
The text was updated successfully, but these errors were encountered:
Feature request
Since react-collapsible is calculating the
scrollHeight
of its children it can pass it through methods likeonOpen
, oronOpening
to let the parent component be aware of that too.This can be really helpful when height and positioning in parent component matters and developer needs to know the content height without using DOM selectors.
For example for
onOpen
:The text was updated successfully, but these errors were encountered: