jquery.repeater
jquery.repeater copied to clipboard
Deep Nested Repeaters and setList
Hello, thanks for the plugin. I hope I am adding this issue correctly so if there are any issues please let me know.
I have been toying with an odd issue when mixing deep nested repeaters (repeater->nested->nested) with the fairly recent setList option that was implemented. The issue arises after setting the list a duplicate of the inner repeater is appearing inside itself.
I've put together a pen to demonstrate:
http://codepen.io/anon/pen/pEYdxZ
You will see in the example that the inner repeater "trousers" appears twice (below itself).
The code is all copied straight from the github readme page but is it possible that I have something wrong with my HTML / setList?
Thanks.
Hmm yea definitely looks like a bug. I implemented the setList pretty hastily I didn't test deep nesting with it. I can take a look hopefully later this week. Thanks :smiley:
Any progress on this one? I just came back around to looking at jQuery repeaters and forgot about this issue.
Kyle, are you able to get repeating lists working at all? Even without the setList, I can't seem to get nested repeaters working. (A bit new to Github, hopefully I'm replying where I should be)
I am also facing the same issue while using setList with nested repeaters. Any updates for this?
Would really appreciate this one resolved.
In my case it was because I had "initEmpty": true in the nested parameters, and it seems doesn't work with setList in nested repeater. If anyone needs it.
var repeater = $('.repeater').repeater({
show: function () {
$(this).slideDown();
},
hide: function (deleteElement) {
$(this).slideUp(deleteElement);
},
initEmpty: true, // It's from parent repeater
repeaters: [{
**initEmpty:true, // I removed this**
selector: '.repeaterProducto',
show: function () {
$(this).slideDown();
},
hide: function (deleteElement) {
$(this).slideUp(deleteElement);
}
}]
});
i have same issue with deep nesting repeater about setList.