diff --git a/packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue b/packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue index 4cf4ae7a6e..68df38797f 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/FieldListAutoCompleteDropdown.vue @@ -2,7 +2,7 @@ import type { SelectProps } from 'ant-design-vue' import type { ColumnType, LinkToAnotherRecordType } from 'nocodb-sdk' import { RelationTypes, UITypes, isVirtualCol } from 'nocodb-sdk' -import { MetaInj, FieldsInj, computed, inject, ref, resolveComponent } from '#imports' +import { MetaInj, computed, inject, ref, resolveComponent } from '#imports' const { modelValue, isSort } = defineProps<{ modelValue?: string @@ -13,8 +13,6 @@ const emit = defineEmits(['update:modelValue']) const meta = inject(MetaInj, ref()) -const fields = inject(FieldsInj, ref()) - const localValue = computed({ get: () => modelValue, set: (val) => emit('update:modelValue', val), diff --git a/packages/nc-gui/composables/useViewFilters.ts b/packages/nc-gui/composables/useViewFilters.ts index 236592c98c..365ca54329 100644 --- a/packages/nc-gui/composables/useViewFilters.ts +++ b/packages/nc-gui/composables/useViewFilters.ts @@ -1,9 +1,8 @@ import type { ColumnType, FilterType, ViewType } from 'nocodb-sdk' import type { ComputedRef, Ref } from 'vue' import type { SelectProps } from 'ant-design-vue' -import { LinkToAnotherRecordType, RelationTypes, UITypes, isVirtualCol } from 'nocodb-sdk' +import { UITypes } from 'nocodb-sdk' import { - FieldsInj, IsPublicInj, MetaInj, computed, @@ -48,8 +47,6 @@ export function useViewFilters( const tabMeta = inject(TabMetaInj, ref({ filterState: new Map(), sortsState: new Map() } as TabItem)) - const fields = inject(FieldsInj, ref()) - const filters = computed({ get: () => { return nestedMode.value ? currentFilters! : _filters.value @@ -87,6 +84,17 @@ export function useViewFilters( }), ) + const types = computed(() => { + if (!meta.value?.columns?.length) { + return {} + } + + return meta.value?.columns?.reduce((obj: any, col: any) => { + obj[col.id] = col.uidt + return obj + }, {}) + }) + const isComparisonOpAllowed = ( filter: FilterType, compOp: { @@ -108,17 +116,6 @@ export function useViewFilters( return true } - const types = computed(() => { - if (!meta.value?.columns?.length) { - return {} - } - - return meta.value?.columns?.reduce((obj: any, col: any) => { - obj[col.id] = col.uidt - return obj - }, {}) - }) - const placeholderFilter = (): Filter => { return { comparison_op: comparisonOpList(options.value[0].uidt as UITypes).filter((compOp) =>