Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Carousel wrong ordering #5638

Closed
antonybudianto opened this issue Mar 16, 2016 · 3 comments
Closed

Carousel wrong ordering #5638

antonybudianto opened this issue Mar 16, 2016 · 3 comments

Comments

@antonybudianto
Copy link

Bug description:

Carousel wrong ordering, same as this

Try to click next slide, and the slide will jump from "slide 0" straight to "slide 6"
Also try to change UIBS version to 1.1.0 and it worked.
The slides work properly within 11 slides, it's broken on the 12th one

Link to minimally-working plunker that reproduces the issue:

Plunker

Version of Angular, UIBS, and Bootstrap

Angular:
1.5

UIBS:
1.2.4

Bootstrap:
3.3.6

@icfantv
Copy link
Contributor

icfantv commented Mar 16, 2016

may be related to #5601.

@charlierudolph
Copy link
Contributor

I believe the bug is here.

return +a.slide.index > +b.slide.index;

For sort, the comparison function needs to return -1, 0, or 1. Returning a boolean doesn't work as false is 0 which means the two are considered equal.

@kirandas82
Copy link

Good catch.. Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants