Browse Source

Merge pull request #8664 from nocodb/nc-fix/misc

Nc fix/misc
pull/8671/head
Ramesh Mane 4 weeks ago committed by GitHub
parent
commit
6d0fda90fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 12
      packages/nc-gui/components/virtual-cell/Lookup.vue
  2. 8
      packages/nocodb/src/db/BaseModelSqlv2.ts

12
packages/nc-gui/components/virtual-cell/Lookup.vue

@ -106,7 +106,7 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning, activ
>
<template v-if="lookupColumn">
<!-- Render virtual cell -->
<div v-if="isVirtualCol(lookupColumn)" class="flex h-full">
<div v-if="isVirtualCol(lookupColumn) && lookupColumn.uidt !== UITypes.Rollup" class="flex h-full">
<!-- If non-belongs-to and non-one-to-one LTAR column then pass the array value, else iterate and render -->
<template
v-if="
@ -174,7 +174,16 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning, activ
'min-h-0 min-w-0': isAttachment(lookupColumn),
}"
>
<LazySmartsheetVirtualCell
v-if="lookupColumn.uidt === UITypes.Rollup"
:edit-enabled="false"
:read-only="true"
:model-value="v"
:column="lookupColumn"
class="px-2"
/>
<LazySmartsheetCell
v-else
:model-value="v"
:column="lookupColumn"
:edit-enabled="false"
@ -216,6 +225,7 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning, activ
@apply bg-transparent;
}
}
.nc-cell-lookup-scroll:hover {
&::-webkit-scrollbar-thumb {
@apply bg-gray-200;

8
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -6715,6 +6715,7 @@ class BaseModelSqlv2 {
if (
![
UITypes.Attachment,
UITypes.JSON,
UITypes.User,
UITypes.CreatedTime,
UITypes.LastModifiedTime,
@ -6889,6 +6890,13 @@ class BaseModelSqlv2 {
}
}
}
} else if (UITypes.JSON === column.uidt) {
if (
data[column.column_name] &&
typeof data[column.column_name] !== 'string'
) {
data[column.column_name] = JSON.stringify(data[column.column_name]);
}
}
}
}

Loading…
Cancel
Save