chenglou / chenglou/react-motion

How to animate height , when element heght is not fixed

Open
#62 51 comments 55 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
21.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Such as, We need an collapse component. An collapse has some panel, every panel has a header element.

When header clicked, then panel open or close. The panel open need animate panel heigth for zero to panel's scrollHeight. Close action reverse.

The problem is, I can only get the hight(el.scrollHeight) of panel after the panel render. React-motion require the endState height, before the panel render.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.