Skip to content

Commit

Permalink
Fix bug introduced by the commit to disable buttons.
Browse files Browse the repository at this point in the history
Standard buttons are now disabled if changes but with inline save
  • Loading branch information
engPabloMartinez committed Aug 4, 2024
1 parent 7acd848 commit 6d17512
Show file tree
Hide file tree
Showing 5 changed files with 5,607 additions and 3,945 deletions.
5 changes: 4 additions & 1 deletion .forceignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ package.xml
**/.eslintrc.json

# LWC Jest
**/__tests__/**
**/__tests__/**
**/tsconfig.json

**/*.ts
4 changes: 2 additions & 2 deletions force-app/main/default/lwc/odDatatable/odDatatable.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
icon-name="utility:add"
onclick={handleAdd}
variant="brand"
disabled={hasChanges}
disabled={standardButtonsDisabled}
>
</lightning-button>
</template>
Expand All @@ -54,7 +54,7 @@
title="Add"
onclick={handleAdd}
variant="brand"
disabled={hasChanges}
disabled={standardButtonsDisabled}
>
</lightning-button-icon>
</template>
Expand Down
6 changes: 5 additions & 1 deletion force-app/main/default/lwc/odDatatable/odDatatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export default class ODDatatable extends LightningElement {
}

get bulkOperationDisabled() {
return this._selectedRows.length === 0 || this.hasChanges;
return this._selectedRows.length === 0 || this.standardButtonsDisabled;
}

get showBulkEditButton() {
Expand Down Expand Up @@ -250,6 +250,10 @@ export default class ODDatatable extends LightningElement {
);
}

get standardButtonsDisabled() {
return this.hasChanges && this.isInlineSave && this._addWithFlow;
}

get showSaveButtons() {
return this.hasChanges && this.isInlineSave;
}
Expand Down
Loading

0 comments on commit 6d17512

Please sign in to comment.