alvarotrigo / alvarotrigo/react-fullpage

FullPage breaks on re-render due to same number of slides

Open
#157 12 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
1.3k
Forks
172
PR merge metrics
No merged PRs in 30d

Description

Hi Alvaro,

As I said in the previous post, your API it's really cool and makes thing a lot nicer.
The issue I mentioned #148 is fixed, we had to find a workaround but it seems like is working

Now slides are generated dynamically onLoad, every time you click on the filtering choices, the page gets rendered together with fullPage.js. The problem appears when switching from filter to filter and I think I found the source of the issue: the problem is on the number of slides generated. If the slides are different in amount, then everything works, but if the number of slides is the same then it breaks the entire site until I click on a filtering option that has a different amount.

Here is an updated version of my CodeSandBox: https://codesandbox.io/s/sweet-napier-6uyq0

### Steps to reproduce it
1. Click on Dry Bar
2. After the page has rendered Click On Beauty
3. As you can see you can't scroll back to the top

I hope you can help me this time

Best
F

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.