Skip to content

Commit e787971

Browse files
fix: clear collection id for new controls
1 parent ea3a8d8 commit e787971

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/components/inspector/collection-records-list.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
data-cy="inspector-collection"
1111
/>
1212
<b-form-text class="mt-2">
13-
{{ $t("Collection Record Control is not available for Anonymous Web Entry") }}
13+
{{ $t("Collection Record Control is not available for Anonymous Web Entry") }}
1414
</b-form-text>
1515
</b-form-group>
1616
</div>
1717
<div v-if="collectionId > 0" class="screen-link mt-2">
18-
<a
18+
<a
1919
:href="`/designer/screen-builder/${
2020
screenMode === 'display' ? idCollectionScreenView : idCollectionScreenEdit
21-
}/edit`"
21+
}/edit`"
2222
target="_blank">
2323
{{ $t(screenMode === 'display' ? "Open View Screen" : "Open Edit Screen") }}
2424
<i class="ml-1 fas fa-external-link-alt" />
@@ -67,11 +67,15 @@ export default {
6767
},
6868
watch: {
6969
value: {
70-
handler(value) {
71-
if (!value) {
70+
handler(newValue) {
71+
if (!newValue) {
72+
// Clear collection id
73+
this.collectionId = null;
74+
7275
return;
7376
}
74-
CONFIG_FIELDS.forEach((field) => (this[field] = value[field]));
77+
78+
CONFIG_FIELDS.forEach((field) => (this[field] = newValue[field]));
7579
},
7680
immediate: true
7781
},

0 commit comments

Comments
 (0)