summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/components
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/renderer/components')
-rw-r--r--gui/src/renderer/components/Accordion.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/gui/src/renderer/components/Accordion.tsx b/gui/src/renderer/components/Accordion.tsx
index 70ae35c988..27a5be53bc 100644
--- a/gui/src/renderer/components/Accordion.tsx
+++ b/gui/src/renderer/components/Accordion.tsx
@@ -93,7 +93,8 @@ export default class Accordion extends React.Component<IProps, IState> {
private collapse() {
// First change height to height in px since it's not possible to transition to/from auto
this.setState({ containerHeight: this.getContentHeight() + 'px' }, () => {
- // Make sure new height has been applied
+ // Make sure new height has been applied. By reading offsetHeight we force the browser to
+ // apply the height before returning.
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
this.containerRef.current?.offsetHeight;
this.setState({ containerHeight: '0' });