You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AutoComplete component, when used as an item in the Form, does not refresh the dropdown content of the AutoComplete component after resetting the form content using form. resetFields()
#7586
Open
1 task
ShuangxiHan opened this issue
May 17, 2024
· 0 comments
As shown in the above code, under normal circumstances,After clearing the data in the a-auto complete component, the dropdown list of the a-auto complete component should display all the data to be queried
What is actually happening?
Actually, when I was selecting a Zhang San, there was only one Zhang San in the drop-down list, but after clearing it, there was still only Zhang San left
If the above code manually deletes and uses the autoComplete component's built-in allowClear function in the input box one by one, it is not a problem. However, using the form's resetFields or manually clearing data is ineffective
The text was updated successfully, but these errors were encountered:
Version
4.2.1
Environment
windows11、node20.10.0、Google Chrome124.0.6367.201(正式版本)vue3.4.21
Reproduction link
https://gitee.com/han_double_happiness/demo.git
Steps to reproduce
重置 <script setup> import { ref } from 'vue' const formRef = ref() const formState = ref({}) const options = ref([ { label: '张三', value: '张三' }, { label: '李四', value: '李四' } ]) const rest = () => { formRef.value.resetFields() // formState.value = {} } const filterOption = (inputValue, option) => { return option.label.includes(inputValue) } </script>What is expected?
As shown in the above code, under normal circumstances,After clearing the data in the a-auto complete component, the dropdown list of the a-auto complete component should display all the data to be queried
What is actually happening?
Actually, when I was selecting a Zhang San, there was only one Zhang San in the drop-down list, but after clearing it, there was still only Zhang San left
If the above code manually deletes and uses the autoComplete component's built-in allowClear function in the input box one by one, it is not a problem. However, using the form's resetFields or manually clearing data is ineffective
The text was updated successfully, but these errors were encountered: