Skip to content

ionItemReorder fires the click event of the list item #17241

Closed

Description

@sachithd

Bug Report

Ionic version:

[x] 4.0.0

Current behavior:

When reordering the items on a list, the click event fires as soon as an item is moved down on a list. But if the item was moved to up , it works as expected.

Expected behavior:

An item on a list should be able to move without triggering the click event. (Same as how it works when moving an item up to reorder)

Steps to reproduce:

Related code:

<ion-list >
     <ion-reorder-group [disabled]="isReorderDisabled" (ionItemReorder)="reorderItem($event)">
     <ion-item [routerLink]="'/item/item-detail/' + mItem.itemId" routerDirection="forward"  *ngFor="let mItem of itemList"  >
           <ion-label>
                {{mItem.title}}
           </ion-label>
        <ion-reorder slot="end"></ion-reorder>
      </ion-item>
      </ion-reorder-group>
</ion-list>
reorderItem(event) {
        const itemToMove = this.itemList.splice(event.detail.from, 1)[0];
        this.itemList.splice(event.detail.to, 0, itemToMove);
        event.detail.complete();
    }

Other information:

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.6.0 (/usr/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0
   @angular-devkit/build-angular : 0.12.1
   @angular-devkit/schematics    : 7.2.1
   @angular/cli                  : 7.2.1
   @ionic/angular-toolkit        : 1.2.2

Capacitor:

   capacitor (Capacitor CLI) : 1.0.0-beta.13
   @capacitor/core           : 1.0.0-beta.13

System:

   NodeJS : v8.15.0 (/usr/bin/node)
   npm    : 6.6.0
   OS     : Linux 4.15

Activity

  1. added a commit that references this issue on Jan 24, 2019
    8211103
  2. added a commit that references this issue on Jan 24, 2019
    986e67b
  3. ionitron-bot commented on Feb 23, 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.

  4. locked and limited conversation to collaborators on Feb 23, 2019
  5. added 3 commits that reference this issue on Apr 26, 2019
    42f5dc3
    1848b73
    c6bd7be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    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