Ion-item-options not working after come back to the page


#1

Hi,

I have list of items that has 2 ion-item-options to the left and to the right,
when user click on item open to him another page that has back option.

at the first time the page viewed the items sliding works well!,
but when click on the item and view another page then click on ‘back’ to the first page with the list the items lost their sliding!!!

any idea why it’s happening? how to fix this???
thanks!!


#2

Can you please provide an example of this? We have not seen this in our demos


#3

thanks for your replay.

here is my code:

   <ion-list>
        <ion-item-sliding *ngFor="let user of users" #item>
                <ion-item >                 
                        <button ion-button (click)="userSelected(user)">{{ user.name }}</button>                      
                </ion-item>
                <ion-item-options side="left">
                    <button ion-button >Favorite</button>
                    <button ion-button color="danger" >Share</button>
                </ion-item-options>

                <ion-item-options side="right">
                    <button ion-button >Unread</button>
                </ion-item-options>
            </ion-item-sliding>
</ion-list>

pay attention: when I copy it in my project happen this bug,
but yesterday at the end of the day I copy that code to a clean project and the bug didn’t happen!
???


#4

more info:
i’ve created a fresh RC2 project using "ionic start mySideMenu sidemenu --v2"
i’ve changed the page1 to include a list with sliding options
then run ionic build ios and test on a real iphone device. (note this issue does not happen on local browser using ionic serve)

to replicate the issue clone this project and run npm install.

steps to produce issue:

  1. open app and click on one of the buttons on the list. -> a new page opens
  2. click back
  3. try to slide right or left.

if slide still works repeat steps 1 to 4 until slide stops working and does not slide anymore.

PLEASE NOTE it seems this happens only when a “menu” exists on the project. when trying with “ionic start myBlank blank --v2” having tabs this issue does not happen.


#5

i am also getting this issue when cloning your repo. @mhartington should I file a formal bug on github project?