jeudi 18 octobre 2018

Checklist in multiple sliders - if selected in one slider, disable in another

I have ion-slider in my page, with 4 slides. Slider is created with *ngFor directive by looping array of 4 slide_items, and one slideItem looks like:

{slide_id: 1, slide_name: "first slide"}

Inside every slide, there is nested checkbox list of checkboxItems created with *ngFor too.

Finally, I have two nested *ngFor loops and inside inner loop, there is creating of ion-checkbox element:

<ion-checkbox (ionChange)="handleCheckbox(slideItem, checkboxItem)" [disabled]=""></ion-checkbox>

How to implement logic that, if I check one item in first slide, the same item in rest of slides will be disabled? Something like on image:

enter image description here




Aucun commentaire:

Enregistrer un commentaire