Hello! it's possible that inside the expected server response, the dropdown module can receive inside the json a property for the avatar url?
For example:
// Expected server response
{
"success": true,
"results": [
{
// name displayed in dropdown
"name" : "Choice 1",
// selected value
"value" : "value1",
// name displayed after selection (optional)
"text" : "Choice 1",
// whether field should be displayed as disabled (optional)
"disabled" : false,
"avatar": "url to image"
},
{
"name" : "Choice 2",
"value" : "value2",
"text" : "Choice 2",
"avatar": "url to image"
}
]
}
Thanks for the great job.
This would produce a dropdown like this https://jsfiddle.net/26a0jqzd/
Implemented by #875
Play with it here https://jsfiddle.net/en6dwvqc/
I implemented a more generic approach (image instead of avatar) because there are more possibilities images may be used within a dropdown than avatars. See PR for explanation.
Most helpful comment
Implemented by #875
Play with it here https://jsfiddle.net/en6dwvqc/
I implemented a more generic approach (
imageinstead ofavatar) because there are more possibilities images may be used within a dropdown than avatars. See PR for explanation.