diff --git a/src/components/select/option.vue b/src/components/select/option.vue index 271c364c1..ad104b457 100644 --- a/src/components/select/option.vue +++ b/src/components/select/option.vue @@ -10,8 +10,8 @@ import mixinsForm from '../../mixins/form'; import { findComponentUpward } from '../../utils/assist'; import random from '../../utils/random_str'; - import { getCurrentInstance } from 'vue'; - import { nextTick } from 'vue'; + import { getCurrentInstance, nextTick } from 'vue'; + import { typeOf } from '../../utils/assist'; const prefixCls = 'ivu-select-item'; export default { @@ -107,7 +107,7 @@ filterOption = (label || '').toLowerCase(); } const showFilterOption = filterOption.includes(query); - return !filterable || filterable && showFilterOption + return !filterable || filterable && showFilterOption || typeOf(SelectInstance.remoteMethod) === 'function'; }, selected(){ const SelectInstance = this.SelectInstance; diff --git a/src/utils/assist.js b/src/utils/assist.js index 3125456b6..b8a08b3dd 100644 --- a/src/utils/assist.js +++ b/src/utils/assist.js @@ -95,7 +95,7 @@ export function warnProp(component, prop, correctType, wrongType) { console.error(`[View UI warn]: Invalid prop: type check failed for prop ${prop}. Expected ${correctType}, got ${wrongType}. (found in component: ${component})`); // eslint-disable-line } -function typeOf(obj) { +export function typeOf(obj) { const toString = Object.prototype.toString; const map = { '[object Boolean]' : 'boolean',