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

ion-slide slideWillChange has already incremented the activeIndex #14982

Closed
johanlantz opened this issue Aug 2, 2018 · 2 comments
Closed

ion-slide slideWillChange has already incremented the activeIndex #14982

johanlantz opened this issue Aug 2, 2018 · 2 comments
Labels
ionitron: v3 moves the issue to the ionic-v3 repository

Comments

@johanlantz
Copy link

Bug Report

Ionic Info

cli packages: (/Users/yc00025/.nvm/versions/node/v8.7.0/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

local packages:

    @ionic/app-scripts : 3.1.11
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.7.0
    npm  : 5.4.2
    OS   : macOS High Sierra

Misc:

    backend : pro

Describe the Bug
I have an ion-slides setup like this:

<ion-slides (ionSlideDidChange)="slideChanged()" (ionSlideWillChange)="slideWillChange()">

slideWillChange() {
   console.log(this.slides.getActiveIndex());
}

slideChanged($event) {
  console.log(this.slides.getActiveIndex());
}

Current Behavior
Both functions output the same activeIndex, i.e. the one we have already moved to.

Expected Behavior
imho, I would expect the slideWillChange() function to have activeIndex as the slide where we are before the transition and the slideChanged() function to output the activeIndex of the new slide once the transition is completed.

@ionitron-bot ionitron-bot bot added the triage label Aug 2, 2018
@Ionitron Ionitron added the ionitron: v3 moves the issue to the ionic-v3 repository label Nov 29, 2018
@ionitron-bot
Copy link

ionitron-bot bot commented Nov 29, 2018

This issue has been automatically identified as an Ionic 3 issue. We recently moved Ionic 3 to its own repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

If I've made a mistake, and if this issue is still relevant to Ionic 4, please let the Ionic Framework team know!

Thank you for using Ionic!

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 29, 2018

Issue moved to: ionic-team/ionic-v3#394

@ionitron-bot ionitron-bot bot closed this as completed Nov 29, 2018
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 29, 2018
@ionitron-bot ionitron-bot bot removed the triage label Nov 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ionitron: v3 moves the issue to the ionic-v3 repository
Projects
None yet
Development

No branches or pull requests

2 participants