Open BenjaminSYD opened 8 months ago
Good catch!
I've fixed it on dev!
Thanks for the quick response!
The bug is resolved when I add a slide. However, the crash persists when I attempt to remove a slide. And my workaround is bad since it bring me back to slide 1.
However, the crash persists when I attempt to remove a slide. And my workaround is bad since it bring me back to slide 1.
It seems the function componentWillUnmount
gets triggered when removing a Slide. Which shouldn't be the case.
But I'm not quite sure what's the issue here.
The adding part was fixed in version 0.1.43 🥳 I'll have to take a second look at the remove part.
Description
Hello,
I have encountered a bug while using the ReactFullPage with slides. Specifically:
Link to Isolated Reproduction with No External CSS/JS
Link to Codesandbox for Reproduction
Steps to Reproduce Crash on Removing a Slide
Steps to Reproduce Bug on Adding a Slide
Note: If you add a slide and then remove it, the crash does not occur, and the issue with the arrow buttons resolves itself.
Workaround
I noticed that this rebuilding log is not called when adding a slide so I guess
isReRenderNecessary()
is returning false. I managed to fix it by sending the following propsectionsColor
to ReactFullpage to force a re-render:And the crash when a slide is removed can be fixed with a call to the
destroy()
method of ReactFullPage ref before removing the slide.Versions
Versions can be found within the Codesandbox link provided.