fix(TypeError): undefined is not an object (evaluating 'ee.value.getAbstractType')

This commit is contained in:
Ramesh Mane
2026-01-17 10:29:18 +00:00
parent e8fe442fce
commit 5d0f80e14a
4 changed files with 9 additions and 8 deletions

View File

@@ -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])

View File

@@ -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 ''

View File

@@ -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 number
if ([dynamicColAbstractType, filterColAbstractType].every((type) => ['float', 'integer'].includes(type))) {

View File

@@ -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]