Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Dragula and ion-col

$
0
0

@shorstmann wrote:

Hi,

i want to use dragula to drag groups around. The groups contain items, so i want to drag the items around the groups. This works fine. Now i want to display the groups in a row or a grid - they should fit in the space of the page e.g. resposive.

this.dragulaService.createGroup('groups', {
        invalid(el, handle) {
            return el.tagName === 'DIV';
        }
    });

 <ion-row>
    <div [dragula]='"groups"' [dragulaModel]='groups'>
        <ion-col size="3" *ngFor="let group of groups;let index = index">
            <ion-header>{{ group.name }}</ion-header>
            <div [dragula]='"items"'>
                <ion-card *ngFor="let item of group.items">
                    <ion-card-subtitle>{{ item.name }}</ion-card-subtitle>
                </ion-card>
            </div>
        </ion-col>
    </div>
</ion-row>

This leads to this

But i wanto to have it like this:

See here for how it should be displayed

If i delete the first with the dragula container it does not work anymore but it displays correct. So what to do?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles