@kkabra wrote:
I have a use case where I use toggle button to update the attendance of students. I have implemented (ionChange) event to record the User’s response. Also, I have a button to mark all the students as present/ absent. While I try to do so the (ionChange) event is triggered twice leading to an error. Can anybody suggest a solution to bypass an event when tow events are called subsequently?
Below code snippet shows my UpdateAttendance.html:
Button to mark all the students as present :
<ion-button shape=“round” size=“small” color=“success” (click)=“buttonToggled(’’,$event)”>
All PresentList of students:
{{getInitial(record.name)}}{{record.name}} Room No - {{record.roomNo}}buttonToggle() method is as below:
this.attendanceRecord.forEach(record => {
record.isPresent = true;
console.log(record); });Thank you in advance,!
Posts: 1
Participants: 1