jquery.repeater icon indicating copy to clipboard operation
jquery.repeater copied to clipboard

Deep Nested Repeaters and setList

Open ghost opened this issue 8 years ago • 7 comments

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.

ghost avatar Oct 25 '16 21:10 ghost

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:

DubFriend avatar Oct 26 '16 04:10 DubFriend

Any progress on this one? I just came back around to looking at jQuery repeaters and forgot about this issue.

ghost avatar Mar 07 '17 09:03 ghost

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)

xadamxk avatar Mar 14 '17 18:03 xadamxk

I am also facing the same issue while using setList with nested repeaters. Any updates for this?

deep0209 avatar Dec 25 '17 13:12 deep0209

Would really appreciate this one resolved.

nytmo avatar Feb 28 '18 15:02 nytmo

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);
                    }
                }]
            });

kypergio avatar Aug 01 '18 04:08 kypergio

i have same issue with deep nesting repeater about setList.

gordios avatar Jun 06 '20 15:06 gordios