import createRef from '../../_util/createRef'; /* eslint-disable no-console */ import Select, { Option } from '..'; import '../assets/index.less'; import { nextTick } from 'vue'; const Combobox = { data() { this.textareaRef = createRef(); this.timeoutId; return { disabled: false, value: '', options: [], }; }, mounted() { nextTick(() => { console.log('Ref:', this.textareaRef.current); }); }, methods: { onChange(value, option) { console.log('onChange', value, option); this.value = value; }, onKeyDown(e) { const { value } = this; if (e.keyCode === 13) { console.log('onEnter', value); } }, onSelect(v, option) { console.log('onSelect', v, option); }, onSearch(text) { console.log('onSearch:', text); }, onAsyncChange(value) { window.clearTimeout(this.timeoutId); console.log(value); this.options = []; //const value = String(Math.random()); this.timeoutId = window.setTimeout(() => { this.options = [{ value }, { value: `${value}-${value}` }]; }, 1000); }, toggleDisabled() { const { disabled } = this; this.disabled = !disabled; }, }, render() { const { value, disabled } = this; return (

combobox

Customize Input Element