1

I have got an md-select:

<md-select (change)="changeShift($event, item)"></md-select>

When I push over that and select value from dropdown, buffer overflow occurs. Then the browser(Google Chrome) stops.

May be function changeShift should return model? How do I solve the problem?

public changeShift(shift_id: number, item: StudyPlan) {
    for ( let i = 0; i < this.studyPlan.length; i++ ) {
      if ( this.studyPlan[i].shift === item.shift) {
          const obj = this.studyPlan[i] as StudyPlan;
          obj.shift = shift_id;
          this.studyPlanToUpdate.push(obj);
      }
    }

    console.log(this.studyPlanToUpdate);
  }
POV
  • 11,293
  • 34
  • 107
  • 201

0 Answers0