diff --git a/packages/components/select-v2/src/useSelect.ts b/packages/components/select-v2/src/useSelect.ts index a6e3194616..f49790629d 100644 --- a/packages/components/select-v2/src/useSelect.ts +++ b/packages/components/select-v2/src/useSelect.ts @@ -4,6 +4,7 @@ import { onMounted, reactive, ref, + toRaw, watch, watchEffect, } from 'vue' @@ -202,10 +203,10 @@ const useSelect = (props: SelectV2Props, emit: SelectV2EmitFn) => { const filterOptions = (query: string) => { const regexp = new RegExp(escapeStringRegexp(query), 'i') - const isFilterMethodValid = - props.filterable && isFunction(props.filterMethod) + const { filterMethod, remoteMethod } = toRaw(props) + const isFilterMethodValid = props.filterable && isFunction(filterMethod) const isRemoteMethodValid = - props.filterable && props.remote && isFunction(props.remoteMethod) + props.filterable && props.remote && isFunction(remoteMethod) const isValidOption = (o: Option): boolean => { if (isFilterMethodValid || isRemoteMethodValid) return true // when query was given, we should test on the label see whether the label contains the given query