diff --git a/components/auto-complete/__tests__/index.test.js b/components/auto-complete/__tests__/index.test.js index 61a6ec826..034c80520 100644 --- a/components/auto-complete/__tests__/index.test.js +++ b/components/auto-complete/__tests__/index.test.js @@ -26,7 +26,7 @@ describe('AutoComplete with Custom Input Element Render', () => { input.element.value = '123'; input.trigger('input'); Vue.nextTick(() => { - expect($$('.ant-select-dropdown-menu-item').length).toBe(3); + expect($$('.ant-select-item-option').length).toBe(3); done(); }); }); diff --git a/components/auto-complete/index.tsx b/components/auto-complete/index.tsx index 9d7112045..77157dfd1 100644 --- a/components/auto-complete/index.tsx +++ b/components/auto-complete/index.tsx @@ -20,8 +20,6 @@ const AutoCompleteProps = { dropdownMenuStyle: PropTypes.style, optionLabelProp: PropTypes.string, dropdownMatchSelectWidth: PropTypes.looseBool, - // onChange?: (value: SelectValue) => void; - // onSelect?: (value: SelectValue, option: Object) => any; }; const AutoComplete = defineComponent({ @@ -86,7 +84,7 @@ const AutoComplete = defineComponent({ render() { const { size, prefixCls: customizePrefixCls, dataSource } = this; let optionChildren: any; - const getPrefixCls = this.configProvider.getPrefixCls; + const { getPrefixCls } = this.configProvider; const prefixCls = getPrefixCls('select', customizePrefixCls); const { class: className } = this.$attrs as any; const cls = {