Skip to content

Commit

Permalink
fixing id record with mustache variables and draft
Browse files Browse the repository at this point in the history
  • Loading branch information
CarliPinell committed Nov 11, 2024
1 parent 1978444 commit 2e19bb6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/renderer/form-collection-record-control.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,17 @@ export default {
(this.selDisplayMode === "View" ? viewScreen : editScreen);
this.loadScreen(this.screenCollectionId);
//This section validates if Collection has draft data
if(this.taskDraft?.draft?.data == null || this.taskDraft.draft.data === '') {
//This section validates if Collection has draft data and if the record is different to the draft record
if (
this.taskDraft?.draft?.data == null ||
this.taskDraft.draft.data === '' ||
String(this.selRecordId) !== this.taskDraft.draft.data.id
) {
this.localData = respData;
}else{
this.localData = _.merge({}, respData, this.taskDraft.draft.data);
}
})
.catch(() => {
this.localData = {};
Expand Down

0 comments on commit 2e19bb6

Please sign in to comment.