Ion-item-sliding option probem


#1

Last open is not closing the open slide item. how to close the last open

here is the code:

<ion-list no-lines *ngFor="let SearchList of _resSearchList">
    <ion-item-sliding>
      <ion-item>
      
        <h2>{{SearchList.SubActivityEnTradeNameEn}}</h2>
        <h3>{{SearchList.SubActivityArTradeNameAr}}</h3>
        <p>{{SearchList.AreaNameEn}} | {{SearchList.AreaNameAr}}</p>
      </ion-item>

      <ion-item-options side="right">
        <button ion-button color="primary">
          <ion-icon name="ios-call-outline"></ion-icon>
          Call
        </button>
        <button ion-button color="secondary">
          <ion-icon name="ios-pin-outline"></ion-icon>
          Map
        </button>
      </ion-item-options>
    </ion-item-sliding>
  </ion-list>

#2
 <ion-item-sliding *ngFor="let project of Projects">
      <ion-item>
      </ion-item>
      <ion-item-options>
      </ion-item-options>
</ion-item-sliding>

#3

I changed your post to format your code or error message correctly. Please use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.


#4

Thanx Sujan12,
Its resolved.


#5

My post was not the solution… what did you do to solve it?


#6

Problem was one I slide one list option and not close and open second list option the last one still open not closed automatically. See the picture you will understand. My mistake was loop in ion-list so I changed it into
<ion-item-sliding *ngFor="let project of Projects">
so its working


#7

so my post was the solution :laughing: