Browse Source

fix(nc-gui): Cannot read properties of undefined (reading 'id')

pull/7855/head
Ramesh Mane 4 months ago
parent
commit
47a08e9e60
  1. 2
      packages/nc-gui/components/smartsheet/Gallery.vue
  2. 2
      packages/nc-gui/components/smartsheet/Kanban.vue
  3. 2
      packages/nc-gui/components/smartsheet/Map.vue
  4. 2
      packages/nc-gui/components/smartsheet/calendar/index.vue
  5. 2
      packages/nc-gui/components/smartsheet/grid/index.vue
  6. 2
      packages/nc-gui/composables/useExpandedFormStore.ts

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

@ -372,7 +372,7 @@ watch(
<Suspense> <Suspense>
<LazySmartsheetExpandedForm <LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg" v-if="expandedFormOnRowIdDlg && meta?.id"
v-model="expandedFormOnRowIdDlg" v-model="expandedFormOnRowIdDlg"
:row="{ row: {}, oldRow: {}, rowMeta: {} }" :row="{ row: {}, oldRow: {}, rowMeta: {} }"
:meta="meta" :meta="meta"

2
packages/nc-gui/components/smartsheet/Kanban.vue

@ -753,7 +753,7 @@ const getRowId = (row: RowType) => {
<Suspense> <Suspense>
<LazySmartsheetExpandedForm <LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg" v-if="expandedFormOnRowIdDlg && meta?.id"
:key="route.query.rowId" :key="route.query.rowId"
v-model="expandedFormOnRowIdDlg" v-model="expandedFormOnRowIdDlg"
:row="{ row: {}, oldRow: {}, rowMeta: {} }" :row="{ row: {}, oldRow: {}, rowMeta: {} }"

2
packages/nc-gui/components/smartsheet/Map.vue

@ -245,7 +245,7 @@ const count = computed(() => paginationData.value.totalRows)
</Suspense> </Suspense>
<Suspense v-if="!isPublic"> <Suspense v-if="!isPublic">
<LazySmartsheetExpandedForm <LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg" v-if="expandedFormOnRowIdDlg && meta?.id"
v-model="expandedFormOnRowIdDlg" v-model="expandedFormOnRowIdDlg"
:row="{ row: {}, oldRow: {}, rowMeta: {} }" :row="{ row: {}, oldRow: {}, rowMeta: {} }"
:meta="meta" :meta="meta"

2
packages/nc-gui/components/smartsheet/calendar/index.vue

@ -331,7 +331,7 @@ const headerText = computed(() => {
<Suspense> <Suspense>
<LazySmartsheetExpandedForm <LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg" v-if="expandedFormOnRowIdDlg && meta?.id"
v-model="expandedFormOnRowIdDlg" v-model="expandedFormOnRowIdDlg"
close-after-save close-after-save
:meta="meta" :meta="meta"

2
packages/nc-gui/components/smartsheet/grid/index.vue

@ -267,7 +267,7 @@ const goToPreviousRow = () => {
/> />
</Suspense> </Suspense>
<SmartsheetExpandedForm <SmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg" v-if="expandedFormOnRowIdDlg && meta?.id"
v-model="expandedFormOnRowIdDlg" v-model="expandedFormOnRowIdDlg"
:row="{ row: {}, oldRow: {}, rowMeta: {} }" :row="{ row: {}, oldRow: {}, rowMeta: {} }"
:meta="meta" :meta="meta"

2
packages/nc-gui/composables/useExpandedFormStore.ts

@ -304,7 +304,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
} }
const loadRow = async (rowId?: string, onlyVirtual = false) => { const loadRow = async (rowId?: string, onlyVirtual = false) => {
if (isPublic.value) return if (isPublic.value || !meta.value?.id) return
let record = await $api.dbTableRow.read( let record = await $api.dbTableRow.read(
NOCO, NOCO,
// todo: base_id missing on view type // todo: base_id missing on view type

Loading…
Cancel
Save