Browse Source

fix(gui-v2): add new row option in row list modal

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3025/head
Pranav C 2 years ago
parent
commit
d0aa549cfe
  1. 5
      packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue

5
packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue

@ -69,11 +69,11 @@ const newRowState = computed(() => {
if (relatedTableColOpt.type === RelationTypes.BELONGS_TO) { if (relatedTableColOpt.type === RelationTypes.BELONGS_TO) {
return { return {
[colInRelatedTable.title as string]: row, [colInRelatedTable.title as string]: row?.value?.row,
} }
} else { } else {
return { return {
[colInRelatedTable.title as string]: [row], [colInRelatedTable.title as string]: row?.value && [row.value.row],
} }
} }
}) })
@ -125,7 +125,6 @@ const newRowState = computed(() => {
:meta="relatedTableMeta" :meta="relatedTableMeta"
:row="{ row: {}, oldRow: {}, rowMeta: { new: true } }" :row="{ row: {}, oldRow: {}, rowMeta: { new: true } }"
:state="newRowState" :state="newRowState"
load-row
use-meta-fields use-meta-fields
/> />
</div> </div>

Loading…
Cancel
Save