Closed shaack closed 3 years ago
I would recommend to add an index to the "transform" method of arrays like this: Line 272:
let index = 0 forEach(value, function (value) { html.push(transform(value, target, index++)); });
then you can use the index in your mapping to know where a user has clicked in a list.
transform: (value, bind, index) => { return '<li><label><input data-index="' + index + '" type="checkbox" ' + (value.done ? " checked" : "") + '/>' + value.text + '</label></li>' }
The more I think about the less important it is.
I would recommend to add an index to the "transform" method of arrays like this: Line 272:
then you can use the index in your mapping to know where a user has clicked in a list.