Skip to content

Commit

Permalink
WIP Debounce
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonTarren committed Sep 20, 2023
1 parent 6ec9f11 commit e5d0372
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem
return "error";
}

get isSaveDisabled() {
return this.isSaving;
}

addDelivery() {
let serviceDelivery = {
index: this._nextIndex,
Expand Down Expand Up @@ -230,6 +234,7 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem
handleSave() {
let rows = this.template.querySelectorAll("c-service-delivery-row");

this.isSaving = true;
this.savedCount = 0;
this.errorCount = 0;
this.targetSaveCount = 0;
Expand All @@ -247,6 +252,7 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem

if (this.targetSaveCount === 0) {
this.dispatchEvent(new CustomEvent("done"));
this.isSaving = false;
}
}

Expand All @@ -260,6 +266,7 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem

if (this.savedCount === this.targetSaveCount) {
this.dispatchEvent(new CustomEvent("done"));
this.isSaving = false;
}
}

Expand Down

0 comments on commit e5d0372

Please sign in to comment.