ionic-team / ionic-v3

The repo for Ionic 3.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
128 stars 85 forks source link

ion-item-sliding not working with *ngFor dynamic list #55

Open ionitron-bot[bot] opened 5 years ago

ionitron-bot[bot] commented 5 years ago

Short description of the problem:

See code below. Without ngFor directive the sliding motion to show buttons is working. When using the ngFor it is not working anymore.

What behavior are you expecting?

Steps to reproduce:

  1. run
<ion-content>
   <ion-list>
      <ion-item-divider light>
         24.03.2016
      </ion-item-divider>
      <ion-item-sliding *ngFor="let ticket of ticket_service.tickets_aktuell" #slidingItem>
         <ion-item>
            <p>{{ticket.Name}}</p>
            <p>{{ticket.Street}}, {{ticket.Postalcode}} {{ticket.City}}</p>
         </ion-item>
         <ion-item-options side="right" icon-left>
            <button ion-button color="secondary" (click)="ticket_bearbeiten(ticket)">
               <ion-icon name="construct"></ion-icon>
               Bearbeiten
            </button>
            <button ion-button default (click)="ticket_details(ticket)">
               <ion-icon name="paper"></ion-icon>
               Details
            </button>
         </ion-item-options>
      </ion-item-sliding>
   </ion-list>
</ion-content>

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Which Ionic Version? 1.x or 2.x 2.1.4

Run ionic info from terminal/cmd prompt: (paste output below)


Your system information:

You have been opted out of telemetry. To change this, run: cordova telemetry on. 6.3.1

Gulp version: CLI version 3.9.1 Gulp local: Ionic CLI Version: 2.1.4 Ionic App Lib Version: 2.1.2 OS: Node Version: v6.9.1

memphis23 commented 5 years ago

This error persists in Ionic version 4.5.0

MdShuaib commented 5 years ago

Did anyone find the solution as @memphis23 reported this error persists in Ionic version 4.5.0 also? Im trying to implement ion-segment with *ngFor in ionic version it doesn't work