π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix(TypeError): undefined is not an object (evaluating 'ee.value.getAbstractType')
Ramesh Mane5d0f80e14a8b
diff --git a/packages/nc-gui/components/smartsheet/Cell.vue b/packages/nc-gui/components/smartsheet/Cell.vueindex 281ea0c305..eddc7cc435 100644--- a/packages/nc-gui/components/smartsheet/Cell.vue+++ b/packages/nc-gui/components/smartsheet/Cell.vue@@ -85,7 +85,7 @@ const isGenerating = computed(const sqlUi = computed(() => baseStore.getSqlUiBySourceId(meta.value?.source_id || column.value?.source_id))-const abstractType = computed(() => column.value && sqlUi.value.getAbstractType(column.value))+const abstractType = computed(() => column.value && sqlUi.value?.getAbstractType(column.value))const emitSave = () => {emit('save', [currentRow.value, column.value.title, state.value, undefined, undefined, path.value])diff --git a/packages/nc-gui/components/smartsheet/PlainCell.vue b/packages/nc-gui/components/smartsheet/PlainCell.vueindex d51e3a8dcc..a1182054bf 100644--- a/packages/nc-gui/components/smartsheet/PlainCell.vue+++ b/packages/nc-gui/components/smartsheet/PlainCell.vue@@ -33,7 +33,7 @@ const { isXcdbBase, isMysql } = useBase()const sqlUi = computed(() => baseStore.getSqlUiBySourceId(column.value?.source_id))-const abstractType = computed(() => column.value && sqlUi.value.getAbstractType(column.value))+const abstractType = computed(() => column.value && sqlUi.value?.getAbstractType(column.value))const parsedValue = computed(() => {if (!meta?.value) return ''diff --git a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vueindex 292045d785..29d071c1f7 100644--- a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue+++ b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue@@ -694,10 +694,11 @@ async function resetDynamicField(filter: any, i) {const { sqlUis, baseId } = storeToRefs(useBase())-const sqlUi =- meta.value?.source_id && meta.value?.base_id === baseId.value+const sqlUi = computed(() => {+ return meta.value?.source_id && meta.value?.base_id === baseId.value && sqlUis.value[meta.value?.source_id]? sqlUis.value[meta.value?.source_id]: Object.values(sqlUis.value)[0]+})const isDynamicFilterAllowed = (filter: FilterType) => {const col = getColumn(filter)@@ -719,7 +720,7 @@ const isDynamicFilterAllowed = (filter: FilterType) => {)return false- const abstractType = sqlUi.getAbstractType(col)+ const abstractType = sqlUi.value?.getAbstractType(col)if (!['integer', 'float', 'text', 'string'].includes(abstractType)) return false@@ -735,9 +736,9 @@ const dynamicColumns = (filter: FilterType) => {if (excludedFilterColUidt.includes(c.uidt as UITypes) || isVirtualCol(c) || (isSystemColumn(c) && !c.pk)) {return false}- const dynamicColAbstractType = sqlUi.getAbstractType(c)+ const dynamicColAbstractType = sqlUi.value?.getAbstractType(c)- const filterColAbstractType = sqlUi.getAbstractType(filterCol)+ const filterColAbstractType = sqlUi.value?.getAbstractType(filterCol)// treat float and integer as numberif ([dynamicColAbstractType, filterColAbstractType].every((type) => ['float', 'integer'].includes(type))) {diff --git a/packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue b/packages/nc-gui/components/smartsheet/toolbar/FilterInput.vueindex 03b7a343e5..4cc289f1e6 100644--- a/packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue+++ b/packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue@@ -70,7 +70,7 @@ const baseStore = useBase()const sqlUi = computed(() => baseStore.getSqlUiBySourceId(column.value?.source_id))-const abstractType = computed(() => column.value && sqlUi.value.getAbstractType(column.value))+const abstractType = computed(() => column.value && sqlUi.value?.getAbstractType(column.value))const checkType = (filterType: FilterType) => {const checkTypeFunction = checkTypeFunctions[filterType]