Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: content is not displayed if collaped default to true #480

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

truph01
Copy link
Contributor

@truph01 truph01 commented Sep 17, 2024

  • This PR will fix the issue content is not displayed if collapsed is true in #479

  • Here is the result after the fix:

Android:

Screen.Recording.2024-09-17.at.09.24.11.mov

Ios:

Screen.Recording.2024-09-17.at.09.24.24.mov

@@ -51,6 +51,12 @@ export default class Collapsible extends Component {
}
}

componentDidMount() {
if (!this.props.collapsed) {
this._toggleCollapsed(this.props.collapsed);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this._toggleCollapsed(this.props.collapsed);
this._measureContent((height) => this.state.height.setValue(height));

Just sharing other option in case we don't want to show the animation transition initially.
cc: @oblador

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-09-17.at.22.03.32.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants