From a5c1bce3c6e35ed2f631292af4fec44257d156b9 Mon Sep 17 00:00:00 2001 From: truph01 Date: Tue, 17 Sep 2024 09:28:03 +0700 Subject: [PATCH] fix: content is not displayed if collaped default to true --- Collapsible.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Collapsible.js b/Collapsible.js index 800923e..76f0785 100644 --- a/Collapsible.js +++ b/Collapsible.js @@ -51,6 +51,12 @@ export default class Collapsible extends Component { } } + componentDidMount() { + if (!this.props.collapsed) { + this._toggleCollapsed(this.props.collapsed); + } + } + contentHandle = null; _handleRef = (ref) => {