Giter Site home page Giter Site logo

Comments (4)

sean-perkins avatar sean-perkins commented on April 27, 2024

Hello @vgahlaut, thanks for reporting this issue.

Are you trying to have multiple reorder groups? The documentation examples show a single reorder group, which is compatible with a dynamic list of items: https://stackblitz.com/edit/ionic-ng-menu-layout-j1sdm3?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts

from ionic-framework.

vgahlaut avatar vgahlaut commented on April 27, 2024

I tried with following 2 ways to put for loop. First one will create multiple reorder group as it is inside loop. But second method should have only 1 reorder group. Both has same issue

First method:

<ion-app> <ion-list *ngFor="let myitem of mylist"> <ion-reorder-group [disabled]="false" (ionItemReorder)="handleReorder($any($event))" > <ion-item> <ion-label> {{ myitem }} </ion-label> <ion-reorder slot="end"></ion-reorder> </ion-item> </ion-reorder-group> </ion-list> </ion-app>

Second Method:

<ion-app> <ion-list> <ion-reorder-group [disabled]="false" (ionItemReorder)="handleReorder($any($event))" *ngFor="let myitem of mylist" > <ion-item> <ion-label> {{ myitem }} </ion-label> <ion-reorder slot="end"></ion-reorder> </ion-item> </ion-reorder-group> </ion-list> </ion-app>

Where should I put the loop to get it working ?

from ionic-framework.

sean-perkins avatar sean-perkins commented on April 27, 2024

@vgahlaut both those code snippets shared will create multiple reorder groups, one for each index of the array.

The recommend approach is to follow the example shown in the comment above: #28909 (comment)

from ionic-framework.

vgahlaut avatar vgahlaut commented on April 27, 2024

Ohh. Ok. Thank you so much. Please close it. My mistake for the implementation

from ionic-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.