vendredi 30 août 2019

Angular checkbox state check fires too often

In my UI, I have too many checkboxes arranged in the form of a grid. Their checked status should be determined from the one time logic which is present in the component. Once updated their status are never going to get changed.

I have updated the checked status by calling a function as below.

[checked]="getCheckedStatus()"

Simplified problem is present in this stackblitz - https://stackblitz.com/edit/angular-o622bw?embed=1&file=src/app/app.component.html

Problem - console.log() (or say getCheckedStatus()) gets fired too often whenever Update button is clicked which is slowing down the performance.




Aucun commentaire:

Enregistrer un commentaire