Open viniciusbig opened 6 years ago
@viniciusbig , did you faced a problem that values of detected items was still there? #141 I have the same kind of issue i think,
@viniciusbig but the index of input array name only gets automatically resorted when using exactly $(this).slideUp(deleteElement);
and I don't know why
@viniciusbig but the index of input array name only gets automatically resorted when using exactly
$(this).slideUp(deleteElement);
and I don't know why
I'm having the same issue as OP.
However I'm also manually renaming the inputs anyway to be compatible with my the form processor being used.
jQuery example:
hide: function (deleteElement) {
$(this).slideUp(deleteElement, function() {
$(this).remove();
$('.item').each(function(i) {
$(this).attr('name', 'item: ' + (i+1));
});
});
},
The README show an example of the
hide
callback which is optionalBut the jQuery slideUp function doesn't actually delete the DOM element and the
$('.repeater').repeaterVal();
method get a wrong dataset, with the deleted data.The better approach should use the
$.remove
.In order to keep the slideUp animation, the example should be: