Browse Source

fix: Fixed issue with data prepopulation in the case of creating new record through links modal in the case of many to many

pull/6938/head
Muhammed Mustafa 12 months ago
parent
commit
6b67d56d5a
  1. 3
      packages/nc-gui/components/virtual-cell/components/ListItems.vue

3
packages/nc-gui/components/virtual-cell/components/ListItems.vue

@ -112,7 +112,8 @@ const newRowState = computed(() => {
if (isNew.value) return {} if (isNew.value) return {}
const colOpt = (injectedColumn?.value as ColumnType)?.colOptions as LinkToAnotherRecordType const colOpt = (injectedColumn?.value as ColumnType)?.colOptions as LinkToAnotherRecordType
const colInRelatedTable: ColumnType | undefined = relatedTableMeta?.value?.columns?.find((col) => { const colInRelatedTable: ColumnType | undefined = relatedTableMeta?.value?.columns?.find((col) => {
if (col.uidt !== UITypes.LinkToAnotherRecord) return false // Links as for the case of 'mm' we need the 'Links' column
if (col.uidt !== UITypes.LinkToAnotherRecord && col.uidt !== UITypes.Links) return false
const colOpt1 = col?.colOptions as LinkToAnotherRecordType const colOpt1 = col?.colOptions as LinkToAnotherRecordType
if (colOpt1?.fk_related_model_id !== meta.value.id) return false if (colOpt1?.fk_related_model_id !== meta.value.id) return false

Loading…
Cancel
Save