nstudio / nstudio/nativescript-plugins

[Carousel][iOS] Changing the slideIndex changes the indicator position, but not the visible slide

Open
#134 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
55
Forks
42
Avg merge
49m
Merged PRs (30d)
1

Description

Hi,

I've noticed that setting the selected page programmatically changes the indicator, but not the visible slide.

Example (Vue):

<Carousel :selectedPage="slideIndex">
      <CarouselItem></CarouselItem>
      <CarouselItem></CarouselItem>
</Carousel>
export default {
    data() {
      return {
         slideIndex: 0
      }
   },

   mounted() {
       this.slideIndex = 1;
   }
}

This will make the indicator active at the seconds position, but the first slide is still visible. On Android it works as expected.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Vue example with the Carousel and compare the iOS behavior with Android, then trace selectedPage through the iOS Carousel implementation. Done means changing slideIndex updates both the active indicator and the visible slide on iOS without regressing the Android behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, typescript
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.