Skip to content

Commit

Permalink
Merge pull request #673 from SalesforceFoundation/feature/248__bsdt-d…
Browse files Browse the repository at this point in the history
…ebounce

Debounce BSDT Save Button
  • Loading branch information
AndersonTarren authored Sep 29, 2023
2 parents 6ec9f11 + ab2756e commit c07c71e
Showing 1 changed file with 7 additions and 1 deletion.
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 @@ -221,9 +225,9 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem
// eslint-disable-next-line no-unused-vars
handleRowError(event) {
this.errorCount++;

if (this.savingComplete()) {
this.showSaveSummaryToast();
this.isSaving = false;
}
}

Expand All @@ -241,6 +245,7 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem
}
if (row.isDirty) {
this.currentSaveCount++;
this.isSaving = true;
}
row.saveRow();
});
Expand All @@ -256,6 +261,7 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem

if (this.savingComplete()) {
this.showSaveSummaryToast();
this.isSaving = false;
}

if (this.savedCount === this.targetSaveCount) {
Expand Down

0 comments on commit c07c71e

Please sign in to comment.