2.4.8
Windows 10 / Chrome 69
2.5.17
https://jsfiddle.net/WoJWoJ/zhej0n5a/
I tried to use the el-autocomplete
tag with the simplest version: an Array returned by the callback function. The suggestion box is visually empty, depite DevTools showing the expected elements in <ElAutocompleteSuggestions>
→ data
→ suggestions
That the suggestions are visible
The suggestions, while being apparently present in the dropdown code, are not visible
What needs to be passed via the callback is an Object
which must have a property called value
. This property holds what is displayed as the suggestion.
For the example above:
filterUsers(user, cb) {
console.log(user)
cb([{'value': 'qqq', 'whatever': 'djhjfh'}, {'value': 'zzz', 'whatever': 'uiuiiu'}])
},
I am not sure the key needs to be value
but it looks so.
Most helpful comment
What needs to be passed via the callback is an
Object
which must have a property calledvalue
. This property holds what is displayed as the suggestion.For the example above:
I am not sure the key needs to be
value
but it looks so.