Would it be feasible to have the feature where you could have an array of objects like such:
[{ name="Johnny Appleseed", id="100" }, { name="Paul Bunyan", id="200" }]
And be able to show the name property in the list but also associate the id property with it once it is selected? Basically hold a reference to the record of the selected item.
Example:
var input = document.getElementById("myinput");
new Awesomplete(input, {
list: [{ name="Johnny Appleseed", id="100" }, { name="Paul Bunyan", id="200" }],
display: 'name'
});
input.on('awesomplete-selectcomplete', function() {
// Ability to get the selected value, such as 'Johnny Appleseed'
// But also get other record information (such as id)
};
Would it be feasible to have the feature where you could have an array of objects like such:
And be able to show the name property in the list but also associate the id property with it once it is selected? Basically hold a reference to the record of the selected item.
Example: