Fixed .update issue in jqrepreat

This commit is contained in:
2024-08-15 18:45:56 -04:00
parent 7bc4f80340
commit 84cd762d33
+3 -3
View File
@@ -231,7 +231,7 @@ MIT license
var $render = $(Mustache.render(this.__jqTemplate, this.__buildData(index, this[index])));
$render.attr('jq-repeat-index', index);
this.__update(this[index].__jq_$el, $render, this[index], this);
this.__putUpdate(this[index].__jq_$el, $render, this[index], this);
this[index].__jq_$el = $render;
};
@@ -249,7 +249,7 @@ MIT license
$el.remove();
};
result.__update = function($el, $render, item, list){
result.__putUpdate = function($el, $render, item, list){
$el.replaceWith($render);
$el.show();
};
@@ -288,7 +288,7 @@ MIT license
return templates;
}
for(let prop of ['put', 'take', 'update', 'parseData']){
for(let prop of ['put', 'take', 'putUpdate', 'parseData']){
Object.defineProperty(result, prop, {
enumerable: false,
get(){