Browse Source

fix(gui-v2): hide add new row from record list in shared form view

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

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

@ -13,6 +13,7 @@ import {
useVModel,
watch,
} from '#imports'
import { IsPublicInj } from '~/context'
const props = defineProps<{ modelValue: boolean }>()
@ -38,6 +39,8 @@ const {
const { addLTARRef, isNew } = useSmartsheetRowStoreOrThrow()
const isPublic = inject(IsPublicInj, ref(false))
const linkRow = async (row: Record<string, any>) => {
if (isNew.value) {
addLTARRef(row, column?.value as ColumnType)
@ -105,7 +108,7 @@ const newRowState = computed(() => {
></a-input>
<div class="flex-1" />
<MdiReload class="cursor-pointer text-gray-500 nc-reload" @click="loadChildrenExcludedList" />
<a-button type="primary" size="small" @click="expandedFormDlg = true">Add new record</a-button>
<a-button v-if="!isPublic" type="primary" size="small" @click="expandedFormDlg = true">Add new record</a-button>
</div>
<template v-if="childrenExcludedList?.pageInfo?.totalRows">
<div class="flex-1 overflow-auto min-h-0">

Loading…
Cancel
Save