Closed The-Code-Monkey closed 6 years ago
You need to enable valueIsItem
, as shown in the demo.
It's not the default because it generally requires a little extra setup to define how to construct objects for input values that didn't come from the datalist
(assuming you're not using datalistOnly
). For example, see the documentation for the onChange
event regarding how valueIsItem
changes its behavior.
when i give an array such as [{ id: 1, name: "test"}]
when i select an item i need it to return the object not just the name how do i do this or why isnt this the default way of doing it?