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

currentId does not reset with change in stories Props #15

Closed
MSalmanTariq opened this issue Apr 24, 2019 · 3 comments
Closed

currentId does not reset with change in stories Props #15

MSalmanTariq opened this issue Apr 24, 2019 · 3 comments

Comments

@MSalmanTariq
Copy link

Updating the stories props for rendering different stories from different person can't reset the counter for new props that is a new array of stories pass to a story component. Which cause new stories to start from the counter where we left our previous stories.
For eg. I have a list of persons who uploaded there stories
Mr X uploaded 5 pictures
Mr Y uploaded 4 pictures
I saw 3 pictures of Mr X from Start and switch to Mr Y stories , So Mr Y stories does not start with the position 1 , it starts from picture 4 because I saw 3 pictures of Mr X and counter does not reset with change in props

@mohitk05
Copy link
Owner

@MSalmanTariq thanks for reporting this bug. Would you be able to take this up and submit a PR? Or else I'll start this one in a few days.

@mohitk05
Copy link
Owner

mohitk05 commented Oct 17, 2019

@MSalmanTariq This is one of the fixes included in version 2, which is currently in a PR, will soon be published.

@mohitk05
Copy link
Owner

@MSalmanTariq Please check v2, which is live now. You can use the prop currentId to control the story to be shown, also the issue you had mentioned is now fixed.

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

No branches or pull requests

2 participants