Browse Source

fix: skip setting default value for LTAR/Links and other virtual columns

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/7208/head
Pranav C 1 year ago
parent
commit
fdd2e93952
  1. 11
      packages/nc-gui/components/smartsheet/grid/GroupByTable.vue

11
packages/nc-gui/components/smartsheet/grid/GroupByTable.vue

@ -1,4 +1,6 @@
<script lang="ts" setup>
import { UITypes, isLinksOrLTAR } from 'nocodb-sdk'
import { RollupColumn } from '../../../../nocodb/src/models'
import Table from './Table.vue'
import { IsGroupByInj, computed, ref } from '#imports'
import type { Group, Row } from '#imports'
@ -43,7 +45,14 @@ function addEmptyRow(group: Group, addAfter?: number) {
addAfter = addAfter ?? group.rows.length
const setGroup = group.nestedIn.reduce((acc, curr) => {
if (curr.key !== '__nc_null__') acc[curr.title] = curr.key
if (
curr.key !== '__nc_null__' &&
// avoid setting default value for rollup, formula, barcode, qrcode, links, ltar
!isLinksOrLTAR(curr.column_uidt) &&
![UITypes.Rollup, UITypes.Lookup, UITypes.Formula, UITypes.Barcode, UITypes.QrCode].includes(curr.column_uidt)
) {
acc[curr.title] = curr.key
}
return acc
}, {} as Record<string, any>)

Loading…
Cancel
Save