-
Notifications
You must be signed in to change notification settings - Fork 113
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
Block stays expenaded with isOpened=false #303
Comments
If I postpone syncyng up
|
Also had the same issue. Can't believe something as obvious as this is a persisting bug. Fixed it by debouncing the state that is tied to Collapse opening & closing (https://thewebdev.info/2021/03/14/how-to-use-the-react-useeffect-hook-with-debounce/). |
Hey @bot19, if that is so obvious and this is a solution you believe is worth having - feel free to fork library, publish with your own namespace and use it. I am not getting paid for anything done here and I have spent a lot of my personal free time working on these libs and maintaining them as much as I could. |
The reason for this and other bugs is that the container's height is fixed into px every time React calls getSnapshotBeforeUpdate(), which happens a bunch of times during the normal application lifecycle. This is fixed in kir4ik's pull request: #310 |
There appears to be a bug for the case when
isOpened
value changes totrue
and then immediatelly changes back tofalse
(because of useEffect). Please see Demo2Inner in this Codepen - https://codepen.io/ascrazy/pen/MWmJWYR?editors=0010The text was updated successfully, but these errors were encountered: