Skip to content

Commit 58fae4e

Browse files
authored
Merge pull request #1770 from ProcessMaker/bugfix/FOUR-20057
bugfix/FOUR-20057: `Select a collection` label is missing when `Record ID` field has a variable
2 parents 4fce936 + 1978444 commit 58fae4e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/renderer/form-collection-record-control.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ export default {
167167
this.selCollectionId = collectionId;
168168
this.selRecordId = recordId;
169169
this.selDisplayMode = modeId;
170-
171170
this.$dataProvider
172171
.getCollectionRecordsView(collectionId, recordId)
173172
.then((response) => {
@@ -176,9 +175,10 @@ export default {
176175
const viewScreen = response.collection.read_screen_id;
177176
const editScreen = response.collection.update_screen_id;
178177
//Choose screen id regarding of the display Mode
179-
this.screenCollectionId =
180-
this.selDisplayMode === "View" ? viewScreen : editScreen;
181-
178+
this.screenCollectionId =
179+
typeof this.selDisplayMode === 'function' ?
180+
(this.collectionmode.modeId === "View" ? viewScreen : editScreen) :
181+
(this.selDisplayMode === "View" ? viewScreen : editScreen);
182182
this.loadScreen(this.screenCollectionId);
183183
184184
//This section validates if Collection has draft data
@@ -192,6 +192,7 @@ export default {
192192
.catch(() => {
193193
this.localData = {};
194194
globalObject.ProcessMaker.alert(this.$t('This content does not exist. We could not locate indicated data'), "danger");
195+
this.placeholder = "Select a collection";
195196
});;
196197
},
197198
isMustache(record) {

0 commit comments

Comments
 (0)