The velo function FileList adds <li> elements to a parent object, like a <ul> container FileCards. It differs from a ListGroupItem because it returns certain properties specific for FileLists.
Html
<ul id="userlist" velo-listitem-id="userid" velo-listitem-text="displayname"></ul>
*Italic attributes are optional
*Bold attributes are mandatory
*Bold attributes are mandatory
Explanation
The velo-listitem-id attribute determines the name of the field that holds the id of the record in the return data.
The velo-listitem-text attribute determines the name of the field that holds the text, typically the file name, of the record in the return data. This item will in other words be the visible part of the list item.
JS
var li = new Velo({
el: "userlist",
type: velo.Constants.elementtypes.USERLIST,
data: {
function: velo.Data.get.users.all,
input: []
},
onclick: {
function: "velo.Vl.kanban.userAdd",
buttonText: "+"
},
delete: {
buttonText: "X",
buttonClass: "btn btn-danger btn-sm right",
buttonFunction: "someDeleteFunction"
},
connections: [{
elementid: otherElementid
}]
});