Stop many call to backend

Posted on by Kim

private saveTimer;

saveSettings() {
  if(this.saveTimer) {
    clearTimeout(this.saveTimer);
  }
  this.saveTimer = setTimeout(() => {
    // Call service...   
    .....
  }, 500);
}

0 Responses to "Stop many call to backend":