Skip to content

Commit

Permalink
Fixing bug on View Mode in Collection Record Control
Browse files Browse the repository at this point in the history
  • Loading branch information
CarliPinell committed Nov 8, 2024
1 parent 4fce936 commit 1801235
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/renderer/form-collection-record-control.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ export default {
this.selCollectionId = collectionId;
this.selRecordId = recordId;
this.selDisplayMode = modeId;
this.$dataProvider
.getCollectionRecordsView(collectionId, recordId)
.then((response) => {
Expand All @@ -176,9 +175,10 @@ export default {
const viewScreen = response.collection.read_screen_id;
const editScreen = response.collection.update_screen_id;
//Choose screen id regarding of the display Mode
this.screenCollectionId =
this.selDisplayMode === "View" ? viewScreen : editScreen;
this.screenCollectionId =
typeof this.selDisplayMode === 'function' ?
(this.collectionmode.modeId === "View" ? viewScreen : editScreen) :
(this.selDisplayMode === "View" ? viewScreen : editScreen);
this.loadScreen(this.screenCollectionId);
//This section validates if Collection has draft data
Expand Down

0 comments on commit 1801235

Please sign in to comment.