Closed Kobee1203 closed 6 years ago
Hi @Kobee1203,
I'll be happy to merge this PR. Could you just put the index argument as second argument?
render: function (item, index){}
That way we don' have a breaking change...
I made the changes. It's ok for you?
Thx
It can be useful when we want to set a different HTML according to the item position.
Here is an example to active the first item:
render: function(index, item) { return '<li' + (index == 0 ? ' class="active"' : '') + '>' + '' + item[this.options.queryBy] + '' + ''; }
Signed-off-by: Nicolas Dos Santos nicolas.dossantos@jalios.com