diff --git a/packages/devui-vue/devui/editable-select/src/composables/use-select.ts b/packages/devui-vue/devui/editable-select/src/composables/use-select.ts index c167fbf295..7ac279b1d4 100644 --- a/packages/devui-vue/devui/editable-select/src/composables/use-select.ts +++ b/packages/devui-vue/devui/editable-select/src/composables/use-select.ts @@ -1,7 +1,7 @@ import { computed, ComputedRef, getCurrentInstance, nextTick, onMounted, reactive, ref, Ref, SetupContext, watch } from 'vue'; import { EditableSelectProps, Option, Options } from '../editable-select-types'; import { createI18nTranslate } from '../../../locale/create'; -import { isNil } from 'lodash'; +import { isFunction, isNil } from 'lodash'; export interface UseSelectStatesReturnType { hoveringIndex: number; @@ -54,9 +54,16 @@ export function useSelect( const t = createI18nTranslate('DEditableSelect', app); const cachedOptions = ref(props.options); + const hasCustomFilter = () => { + return (props.remote && isFunction(props.remoteMethod)) || isFunction(props.filterMethod); + }; + // computed const filteredOptions = computed(() => { return cachedOptions.value.filter((option) => { + if (hasCustomFilter()) { + return true; + } return option.label.toLocaleLowerCase().includes(states.query.toLocaleLowerCase().trim()); }); }); diff --git a/packages/devui-vue/package.json b/packages/devui-vue/package.json index 2992568eb6..1cbec3fd4e 100644 --- a/packages/devui-vue/package.json +++ b/packages/devui-vue/package.json @@ -1,6 +1,6 @@ { "name": "vue-devui", - "version": "1.6.3-markdown.2", + "version": "1.6.3-editable-select.1", "license": "MIT", "description": "DevUI components based on Vite and Vue3", "keywords": [