Browse Source

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

pull/7855/head
Ramesh Mane 10 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>
<LazySmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg"
v-if="expandedFormOnRowIdDlg && meta?.id"
v-model="expandedFormOnRowIdDlg"
:row="{ row: {}, oldRow: {}, rowMeta: {} }"
:meta="meta"

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

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

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

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

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

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

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

@ -267,7 +267,7 @@ const goToPreviousRow = () => {
/>
</Suspense>
<SmartsheetExpandedForm
v-if="expandedFormOnRowIdDlg"
v-if="expandedFormOnRowIdDlg && meta?.id"
v-model="expandedFormOnRowIdDlg"
:row="{ row: {}, oldRow: {}, rowMeta: {} }"
: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) => {
if (isPublic.value) return
if (isPublic.value || !meta.value?.id) return
let record = await $api.dbTableRow.read(
NOCO,
// todo: base_id missing on view type

Loading…
Cancel
Save