Documentation for Materialize chips shows you can make chips with images:
<div class="chip">
<img src="images/yuna.jpg" alt="Contact Person">
Jane Doe
</div>
This works fine - and when we come to the autocomplete option, this also works:
$('.chips-autocomplete').material_chip({
autocompleteOptions: {
data: {
'Apple': null,
'Microsoft': null,
'Google': 'images/juna.jpg'
},
limit: Infinity,
minLength: 1
}
});
As we have specified "images/juna.jpg" as the value for the "Google" property in the object, this image shows up alongside the autocomplete dropdown when we begin typing "Goo".
However, when this dropdown item is selected, it simply adds a chip that says "Google" with a close button, no image. Is it possible to have the images show up alongside the text in the chip after it is created?