Browse Source

fix(nc-gui): link to row

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
838123c115
  1. 5
      packages/nc-gui/components/smartsheet/Gallery.vue
  2. 4
      packages/nc-gui/components/smartsheet/Grid.vue

5
packages/nc-gui/components/smartsheet/Gallery.vue

@ -1,5 +1,6 @@
<script lang="ts" setup>
import { onMounted } from '@vue/runtime-core'
import type { ColumnType } from 'nocodb-sdk'
import { isVirtualCol } from 'nocodb-sdk'
import {
ActiveViewInj,
@ -85,10 +86,10 @@ const attachments = (record: any): Array<Attachment> => {
}
}
const expandForm = (row: RowType, _state?: Record<string, any>) => {
const expandForm = (row: RowType, state?: Record<string, any>) => {
if (!isUIAllowed('xcDatatableEditable')) return
const rowId = extractPkFromRow(row.row, meta.value.columns)
const rowId = extractPkFromRow(row.row, meta.value?.columns as ColumnType[])
if (rowId) {
router.push({

4
packages/nc-gui/components/smartsheet/Grid.vue

@ -135,7 +135,9 @@ reloadViewDataHook?.on(async (shouldShowLoading) => {
const skipRowRemovalOnCancel = ref(false)
const expandForm = (row: Row, state?: Record<string, any>, fromToolbar = false) => {
const rowId = extractPkFromRow(row.row, meta.value.columns)
if (!isUIAllowed('xcDatatableEditable')) return
const rowId = extractPkFromRow(row.row, meta.value?.columns as ColumnType[])
if (rowId) {
router.push({

Loading…
Cancel
Save