Browse Source

fix(nc-gui): Fixed issue with belongs to chip

pull/6600/head
Muhammed Mustafa 1 year ago
parent
commit
2e67615e83
  1. 1
      packages/nc-gui/components/smartsheet/expanded-form/index.vue
  2. 6
      packages/nc-gui/components/virtual-cell/components/ItemChip.vue

1
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -556,7 +556,6 @@ export default {
:col-id="col.id" :col-id="col.id"
:data-testid="`nc-expand-col-${col.title}`" :data-testid="`nc-expand-col-${col.title}`"
> >
<pre>{{ col }}</pre>
<div class="flex items-start flex-row xs:(flex-col w-full) nc-expanded-cell min-h-10"> <div class="flex items-start flex-row xs:(flex-col w-full) nc-expanded-cell min-h-10">
<div class="w-[12rem] xs:(w-full) mt-1.5 !h-[35px]"> <div class="w-[12rem] xs:(w-full) mt-1.5 !h-[35px]">
<LazySmartsheetHeaderVirtualCell <LazySmartsheetHeaderVirtualCell

6
packages/nc-gui/components/virtual-cell/components/ItemChip.vue

@ -1,4 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { ColumnType } from 'nocodb-sdk'
import { UITypes, isVirtualCol } from 'nocodb-sdk' import { UITypes, isVirtualCol } from 'nocodb-sdk'
import { import {
ActiveCellInj, ActiveCellInj,
@ -41,12 +42,13 @@ const isLocked = inject(IsLockedInj, ref(false))
const { open } = useExpandedFormDetached() const { open } = useExpandedFormDetached()
function openExpandedForm() { function openExpandedForm() {
if (!readOnly.value && !isLocked.value && !readonlyProp) { const rowId = extractPkFromRow(item, relatedTableMeta.value.columns as ColumnType[])
if (!readOnly.value && !isLocked.value && !readonlyProp && rowId) {
open({ open({
isOpen: true, isOpen: true,
row: { row: item, rowMeta: {}, oldRow: { ...item } }, row: { row: item, rowMeta: {}, oldRow: { ...item } },
meta: relatedTableMeta.value, meta: relatedTableMeta.value,
loadRow: true, rowId,
useMetaFields: true, useMetaFields: true,
}) })
} }

Loading…
Cancel
Save