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
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)
};
The text was updated successfully, but these errors were encountered:
To everyone interested in differentiating value from displayed text, aka key/value feature, aka array of objects feature.
The code is ready and it's almost 100% backward compatible. To ensure everything working fine for you we need your help with testing it in the wild before it's released. See this PR: Separate label/value for each suggestion in list
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:
The text was updated successfully, but these errors were encountered: