diff options
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/src/renderer/components/Accordion.tsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gui/src/renderer/components/Accordion.tsx b/gui/src/renderer/components/Accordion.tsx index a9b07a7493..87dfdede24 100644 --- a/gui/src/renderer/components/Accordion.tsx +++ b/gui/src/renderer/components/Accordion.tsx @@ -104,11 +104,13 @@ export default class Accordion extends React.Component<IProps, IState> { } } - private onTransitionEnd = () => { - this.props.onTransitionEnd?.(); - if (this.props.expanded) { - // Height auto enables the container to grow if the content changes size - this.setState({ containerHeight: 'auto' }); + private onTransitionEnd = (event: React.TransitionEvent<HTMLDivElement>) => { + if (event.target === this.containerRef.current) { + this.props.onTransitionEnd?.(); + if (this.props.expanded) { + // Height auto enables the container to grow if the content changes size + this.setState({ containerHeight: 'auto' }); + } } }; } |
