e.g. if i have a webix widget:
webix.ui({
view: 'list',
id: 'myList',
container: 'myListContainer',
template: '#text#',
select: 'multiselect',
autoheight: true,
navigation: true,
data: [
{text:'foo'},
{text:'bar'},
{text:'baz'},
{text:'qux'},
],
})
i can get an ID by an index
var l=$$('myList'), d=l.data
var id = d.getIdByIndex(2) // <--- HERE
d.getItem(id) //=> {id:1428492928744, text:"baz"}
but I want to get an ID by an actual data item object, e.g.:
var id = d.id({text:'baz'}) // or something similar
here’s an example JSBin: JS Bin - Collaborative JavaScript Debugging