3636
3737 <div v-if =" activeTabId === 'edit'" class =" row" >
3838 <div v-for =" column in nonMetaColumns" :key =" column.id" >
39- <RowFormWrapper v-if =" column .type === ' relation_lookup' " :title =" column .title " :mandatory =" column .mandatory " :description =" column .description " :readonly =" column .readonly " >
40- <TableCellRelationLookup :column =" column "
41- :row-id =" row .id "
42- :value =" localRow [column .customSettings .relationColumnId ]" />
43- </RowFormWrapper >
44- <ColumnFormComponent v-else-if =" column .type !== ' relation_lookup' && column .type !== ' text-template' "
39+ <ColumnFormComponent
40+ v-if =" column .type !== ' text-template' "
4541 :column =" column "
46- :value .sync =" localRow [column . id ]" />
47- <NcNoteCard v-if =" isMandatory (column ) && ! isValueValidForColumn (localRow [column . id ], column )"
42+ :value .sync =" localRow [getValueColumnId ( column ) ]" />
43+ <NcNoteCard v-if =" isMandatory (column ) && ! isValueValidForColumn (localRow [getValueColumnId ( column ) ], column )"
4844 type="error">
4945 {{ t('tables', '"{columnTitle}" should not be empty', { columnTitle: column.title }) }}
5046 </NcNoteCard >
51- <NcNoteCard v-if =" localRow [column . id ] && column .type === ' text-link' && ! isValidUrlProtocol (localRow [column . id ])"
47+ <NcNoteCard v-if =" localRow [getValueColumnId ( column ) ] && column .type === ' text-link' && ! isValidUrlProtocol (localRow [getValueColumnId ( column ) ])"
5248 type="error">
5349 {{ t('tables', 'Invalid protocol. Allowed: {allowed}', {allowed: allowedProtocols.join(', ')}) }}
5450 </NcNoteCard >
@@ -107,8 +103,6 @@ import HomeIcon from 'vue-material-design-icons/Home.vue'
107103import HomeOutlineIcon from ' vue-material-design-icons/HomeOutline.vue'
108104import ActivityList from ' ../../shared/components/ActivityList.vue'
109105import activityMixin from ' ../../shared/mixins/activityMixin.js'
110- import TableCellRelationLookup from ' ../../shared/components/ncTable/partials/TableCellRelationLookup.vue'
111- import RowFormWrapper from ' ../../shared/components/ncTable/partials/rowTypePartials/RowFormWrapper.vue'
112106
113107export default {
114108 name: ' EditRow' ,
@@ -122,8 +116,6 @@ export default {
122116 ActivityOutlineIcon,
123117 HomeIcon,
124118 HomeOutlineIcon,
125- TableCellRelationLookup,
126- RowFormWrapper,
127119 },
128120 mixins: [permissionsMixin, rowHelper, activityMixin],
129121 props: {
@@ -168,7 +160,7 @@ export default {
168160 return this .checkMandatoryFields (this .localRow )
169161 },
170162 hasInvalidUrlProtocol () {
171- return this .nonMetaColumns .some (col => col .type === ' text-link' && ! this .isValidUrlProtocol (this .localRow [col . id ]))
163+ return this .nonMetaColumns .some (col => col .type === ' text-link' && ! this .isValidUrlProtocol (this .localRow [this . getValueColumnId (col) ]))
172164 },
173165 },
174166 watch: {
@@ -193,6 +185,9 @@ export default {
193185 ... mapActions (useDataStore, [' updateRow' , ' removeRow' , ' updatePublicRow' , ' removePublicRow' ]),
194186 ... mapActions (useTablesStore, [' setActiveRowId' ]),
195187 t,
188+ getValueColumnId (column ) {
189+ return column .getValueColumnId ? column .getValueColumnId () : column .id
190+ },
196191 loadValues () {
197192 if (this .row ) {
198193 const tmp = {}
0 commit comments