Hello,
I’m attempting to insert an item at the top of a dropdown, but this dropdown is using the renderer function to customize the look of the list items. Is there a way to use insertAt with rendered list items, perhaps with the html field? I have not been successful. Many thanks.
B
my dropdown renderer:
renderer: function (index, label, value) {
var datarecord = empSource.records[index];
var imgurl = ‘http://lex.lsbc.org/extract/staff/’ + datarecord.staff_pic;
var img = ‘
‘;
var table = ‘<div style=”float:left; width:90px;”>’ + img + ‘</div> <div>’ + datarecord.preferred_nm + ‘</div></br><div>’ + datarecord.title + ‘</div>’
return table;
}