question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: item-sliding requires multiple interactions when trying to open another item

See original GitHub issue

Ionic version: [] 4.x [x] 5.x

I’m submitting a … [x] bug report [ ] feature request

Current behavior: I used <ion-item-sliding> to achieve the function that user can dragged my ion-item to reveal the buttons. Now the behavior is that when I have opened one row to reveal the hidden buttons, and I continue to try open another one without closing the previous one. The first one is auto closed, but the second row is not open as expected. I need to drag again the second row to reveal the buttons.

Expected behavior: The expected behavior should be that when I opened one row, I can drag another row to let first row auto close and open the new row simultaneously.

Related code:

–>

<div class="fund-box" *ngFor="let fund of funds ;let i=index"">
  <ion-item-sliding (ionDrag)="changeSliderIcon($event)" #slidingItem>
    <ion-item class="ion-no-margin ion-no-padding content-box" lines="none">
      <span class="rank rank{{i+1}}">{{i+1}}</span>
      <div class="remark-box">
        <div class="remark checked">{{fund.remark}}</div>
        <div class="tip">{{fund.remark_tip}}</div>
      </div>
      <div class="count-box left-slide">
        <div class="count">{{fund.count}}<span class="percent">%</span></div>
        <div class="tip">{{fund.count_tip}}</div>
      </div>
    </ion-item>
    <ion-item-options class="ion-align-items-stretch operation-box" lines="none">
      <div>
        <img src="/assets/images/home/love.png" class="love" (click)="onClickFavorite($event,slidingItem)"/>
      </div>
      <div class="setting" (click)="onClickSetting($event,slidingItem)" >{{fund.setting1}}<br>{{fund.setting2}}</div>
      <div class="buy" (click)="onClickBuy($event,slidingItem)" >{{fund.buy}}</div>
    </ion-item-options>
  </ion-item-sliding>
</div>

Ionic info:

Ionic:

   Ionic CLI                     : 6.10.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.1.1
   @angular-devkit/build-angular : 0.901.8
   @angular-devkit/schematics    : 9.1.8
   @angular/cli                  : 9.1.8
   @ionic/angular-toolkit        : 2.2.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res : not installed
   native-run  : 1.0.0

System:

   ios-deploy : 1.10.0
   ios-sim    : 8.0.2
   NodeJS     : v10.15.1 (/usr/local/bin/node)
   npm        : 6.4.1
   OS         : macOS Catalina
   Xcode      : Xcode 11.4 Build version 11E146

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
g9276012commented, Jun 20, 2020

Hi, here is a sample with gif.

https://github.com/g9276012/ionic-5-item-sliding-problem

At home page the item can’t be slide to open before the first item closed. but at work page the item can slide to open with the first item closing at same time.

1reaction
liamdebeasicommented, Aug 2, 2021

Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic-framework/pull/23683, and a fix will be available in an upcoming release of Ionic Framework.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic Item Sliding ngIf Issue - angular - Stack Overflow
In your example, you can't open sliding options if you change status (to in_progress ) and close an item. But in mine, you...
Read more >
ion-item-sliding - Ionic Framework
A sliding item contains an item that can be dragged to reveal option buttons. It requires an item component as a child. All...
Read more >
Webservices and cloud communication - European Commission
In many situations we need to pass parameters from one page to another for example from a list page ... <ion-icon name='logo-twitter' item-start></ion-icon>....
Read more >
Create a Sliding Item Animation with a Directive in Ionic 2 & 3
A common user interface element you will likely have seen in many ... we want to keep displaying the animation until the user...
Read more >
How to Integrate Supabase in Your Ionic App - Devdactic
This is a bit different from Firebase, because the database used by Supabase is ... To connect our Ionic app to Supabase we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found