From 60410e7c511624e6f67a611d1c337b54f7821dd3 Mon Sep 17 00:00:00 2001 From: Saurav Dutta Date: Wed, 21 May 2025 18:25:34 +0530 Subject: [PATCH 1/5] Revert "Update Collapsible.js" This reverts commit a66fea3a444696398b494343b6d5b5b63c85be47. --- Collapsible.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Collapsible.js b/Collapsible.js index d03f1ac..addb933 100644 --- a/Collapsible.js +++ b/Collapsible.js @@ -30,7 +30,7 @@ export default class Collapsible extends Component { if (!this.props.collapsed) { setTimeout(() => { this._measureContent((height) => this.state.height.setValue(height)); - }, 0); + }, 0) } } From 1510723f4a5f007455584520ab3bf29d5da229e6 Mon Sep 17 00:00:00 2001 From: Saurav Dutta Date: Wed, 21 May 2025 18:25:39 +0530 Subject: [PATCH 2/5] Revert "Update Collapsible.js" This reverts commit b13db7cb12d7e8c68ed5c55b033e8c6e23add652. --- Collapsible.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Collapsible.js b/Collapsible.js index addb933..f72b85e 100644 --- a/Collapsible.js +++ b/Collapsible.js @@ -30,7 +30,7 @@ export default class Collapsible extends Component { if (!this.props.collapsed) { setTimeout(() => { this._measureContent((height) => this.state.height.setValue(height)); - }, 0) + }, [1000]) } } From 7da1e6dffa63df6288cb422e26effe0e4c0d1c6e Mon Sep 17 00:00:00 2001 From: Saurav Dutta Date: Wed, 21 May 2025 18:27:37 +0530 Subject: [PATCH 3/5] Revert "Update Collapsible.js" This reverts commit 0c974020906c604c8087ec78d11bcc01f4fe2cad. --- Collapsible.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Collapsible.js b/Collapsible.js index f72b85e..37cb4c1 100644 --- a/Collapsible.js +++ b/Collapsible.js @@ -28,9 +28,7 @@ export default class Collapsible extends Component { componentDidMount() { if (!this.props.collapsed) { - setTimeout(() => { - this._measureContent((height) => this.state.height.setValue(height)); - }, [1000]) + this._measureContent((height) => height != null && this.state.height.setValue(height)); } } From 8c1d06aa529acd085c9b3617bb6ddefa23c04022 Mon Sep 17 00:00:00 2001 From: Saurav Dutta Date: Wed, 21 May 2025 19:00:20 +0530 Subject: [PATCH 4/5] Update Collapsible.js --- Collapsible.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Collapsible.js b/Collapsible.js index 37cb4c1..82534f8 100644 --- a/Collapsible.js +++ b/Collapsible.js @@ -28,7 +28,7 @@ export default class Collapsible extends Component { componentDidMount() { if (!this.props.collapsed) { - this._measureContent((height) => height != null && this.state.height.setValue(height)); + this._measureContent((height) => this.state.height.setValue(height)); } } @@ -194,7 +194,7 @@ export default class Collapsible extends Component { const hasKnownHeight = !measuring && (measured || collapsed); const style = { overflow: 'hidden', - height: hasKnownHeight ? height : 0, + height: hasKnownHeight ? height : 'unset', }; const contentStyle = {}; if (measuring) { From e17a1ba553e846d6a9b76812e33a9b8846e570ed Mon Sep 17 00:00:00 2001 From: Saurav Dutta Date: Wed, 21 May 2025 19:58:24 +0530 Subject: [PATCH 5/5] Update Collapsible.js --- Collapsible.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Collapsible.js b/Collapsible.js index 82534f8..e089fcd 100644 --- a/Collapsible.js +++ b/Collapsible.js @@ -26,12 +26,6 @@ export default class Collapsible extends Component { }; } - componentDidMount() { - if (!this.props.collapsed) { - this._measureContent((height) => this.state.height.setValue(height)); - } - } - componentDidUpdate(prevProps) { if (prevProps.collapsed !== this.props.collapsed) { this.setState({ measured: false }, () =>