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 inconsistent index when number of pages changes #646

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

JulianKingman
Copy link

Is it a bugfix ?

Yes, it should fix #637, #635, #632, #617, and maybe others.

Describe what you've done:

in the initState function, if the number of items changes or index should be changed, it was setting it to the lower of either: the current index, or the total childen minus 1. However, the number of children was already updated, meaning that the index should be equal to the current number of children, so I just removed the minus 1.

How to test it ?

Add/remove pages, see if index remains consistent.

@zinoviev
Copy link

zinoviev commented Aug 4, 2018

This is import fix - without it component is not usable for presenting dynamic data. Please consider the opportunity to merge it to master

Edit: After some experiments, this PR don't fully resolve my issues - if I use 3 slides when updated children and set 1 and then go back to 3 - index calculating is wrong.

But this PR #655 resolves this issue

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.

the dots were not changing when using map to display data
2 participants