Skip to content

Conversation

@ralam
Copy link
Contributor

@ralam ralam commented May 24, 2021

Check if the current slide should be the last slide when dataStream is updated. This fixes an issue where the dataStream is updated but the carousel slides do not move. In the current state, isLast will incorrectly be set to false. With these changes, isLast will stay false if the carousel is still on the last slide after the data updates.

I've tested these changes on a local application with this patch.

Check if the current slide should be the last slide when dataStream is updated.
This fixes an issue where the dataStream is updated but the carousel
slides do not move. In the current state, isLast will incorrectly be set
to false. With these changes, isLast will stay false if the carousel is
    still on the last slide after the data updates
@chivesrs
Copy link
Contributor

@santoshyadavdev The context for this PR is, if we create a carousel that can be paged left and right, and we also allow the user to remove items from the carousel.
Consider the case of a carousel containing suggestions that you can accept or reject. You can page left/right which does nothing but move, but accepting and rejecting removes the element from the carousel.
We found that if you were on the last page, accepting or rejecting would remove the element from the carousel, but also somehow enable the "next page" button.

This PR aims to fix that issue.

ralam added 2 commits May 25, 2021 15:48
Check if the current slide should be the last slide when dataStream is updated.
This fixes an issue where the dataStream is updated but the carousel
slides do not move. In the current state, isLast will incorrectly be set
to false. With these changes, isLast will stay false if the carousel is
still on the last slide after the data updates.
@santoshyadavdev
Copy link
Member

santoshyadavdev commented May 25, 2021

Thanks, @ralam will get it to release on Thursday.

@santoshyadavdev santoshyadavdev merged commit a7f001a into uiuniversal:master May 25, 2021
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.

3 participants