Skip to content

Ionic 4 sliding item don't stay open after list update #17575

Closed

Description

@Mazus

Bug Report

Ionic version:

[x] 4.0.2

Current behavior:

After a list update the sliding items don't stay open so it's impossible to use the item options, the sliding do show the option but releasing the touch makes the sliding automatically close.
Expected behavior:

List update shouldn't change the way sliding option works.

Steps to reproduce:

In virtual-scroll, add several items-sliding dynamically and update the list.

Related code:

<ion-virtual-scroll *ngIf="viewModeCard" [items]="getCurrentList()" no-padding approxItemHeight="120">
        <ion-card *virtualItem="let item;" class="fadeIn">
            <ion-item-sliding>
                <ion-item button no-padding lines="none" (click)="showDetail(item.id)">
                    <ion-thumbnail slot="start" class="collectionThumb">
                        <img-loader class="gameImg" [src]="item.image.S80"></img-loader>
                    </ion-thumbnail>
                    <ion-label>
                        <h2 text-wrap>{{item.title}} ({{item.edition}})</h2>
                        <progress-bar [progress]="getFloatNote(item.rating)"></progress-bar>
                </ion-item>
                <ion-item-options class="optionGrid" *ngIf="currentTab == 'collection'">
                    <ion-item-option (click)="deleteItem(item.id)" color="danger">
                        <ion-icon slot="icon-only" name="trash"></ion-icon>
                    </ion-item-option>
                    <ion-item-option (click)="editNoteModal(item)" color="secondary">
                        <ion-icon slot="icon-only" name="create"></ion-icon>
                    </ion-item-option>
                </ion-item-options>
            </ion-item-sliding>
        </ion-card>
    </ion-virtual-scroll>

Other information:
This has been seen in several other bugs like #16824 but it was supposed to be working.

Ionic:

   ionic (Ionic CLI)             : 4.10.2 (C:\Users\rmazu\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.2
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.3.2
   @angular/cli                  : 7.3.2
   @ionic/angular-toolkit        : 1.4.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : not available

System:

   Android SDK Tools : 26.1.1 (C:\DEV\AndroidSDK)
   NodeJS            : v10.15.0 (C:\DEV\nodejs\node.exe)
   npm               : 6.4.1
   OS                : Windows 10

Activity

  1. liamdebeasi commented on Feb 22, 2019

    @liamdebeasi
    Contributor

    Hi there,

    Thanks for opening an issue with us! I am unable to reproduce the issue you are experiencing. Can you provide a link to a repository with the code necessary to reproduce this issue? Thanks!

    Update: I was able to reproduce the issue. We will look into it. Thanks 🙂

  2. added
    needs: reply
    on Feb 22, 2019
  3. added
    package: core
    type: bug
    and removed
    needs: reply
    on Feb 22, 2019
  4. liamdebeasi commented on Feb 22, 2019

    @liamdebeasi
    Contributor

    Hi @Mazus,

    I created a PR that should resolve the issue you are experiencing: #17579

    Hoping to get this merged in soon!

  5. self-assigned this
    on Feb 22, 2019
  6. Mazus commented on Feb 24, 2019

    @Mazus
    Author

    @liamdebeasi Thanks a lot ! that was fast :)
    Also I noticed another bug inside the virtual-scroll with the same example: when you open a sliding item, there are several items at regular distance in the list that are also opened ! I guess that has something to do with the selector in the virtual-scroll.
    I will open an issue about that tomorow.
    Thanks again.

  7. liamdebeasi commented on Feb 28, 2019

    @liamdebeasi
    Contributor

    This has been resolved by #17579 and will be in the next release of Ionic!

  8. Mazus commented on Mar 18, 2019

    @Mazus
    Author

    Hello,
    I've been testing this with the same code I mentionned in this issue, and it is still not working for me with ionic 4.1.1.
    It works when first loading the page, but as soon as I update the [items] data source, the sliding options don't stay open and I can't use it.

    Any idea ?
    Thanks.

  9. liamdebeasi commented on Mar 18, 2019

    @liamdebeasi
    Contributor

    Hi there,

    If you are still running into problems, please open a new issue. Thanks!

  10. ionitron-bot commented on Apr 17, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  11. locked and limited conversation to collaborators on Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

package: coretype: bug

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions