Autocomplete filters by value only instead of value & text
See original GitHub issueWhen I use an Autocomplete from this package, it seems to set the value of the autocomplete field as the input from the textbox. This is fine when I search for anything that is not contained in the ‘value’ field of my dataset but, as soon as I enter a value that is part of the dataset’s value field, it automatically assigns that option as the only possible option. The normal ant autocomplete will keep showing me available options from the dataset’s text field.
A possible fix could be to only set the Autocomplete’s value attribute when an option is SELECTED and not when text is being typed into the input box.
As an example, if I have the following data:
[
{value: 0, text: 'Test'},
{value: 1, text: 'Text With 2'},
{value: 2, text: 'Text With 1'},
]
And I type in a ‘1’ into the input box, the selected value will automatically become the second element {value: 1, text: 'Text With 2'}, even though I would expect it to also show me {value: 2, text: 'Text With 1'} as an option.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)

Top Related StackOverflow Question
Should be fixed in v1.6.2
No worries. We’ll prioritize upgrading to antd4 asap. Thank you.