DubFriend / jquery.repeater

Create a repeatable group of input elements
MIT License
390 stars 193 forks source link

Dynamically added select options are not showing #67

Open rides90 opened 6 years ago

rides90 commented 6 years ago

When i click the repeater add button the dynamically added select options are not showing in the new repeater row.

Pablo-Araya commented 5 years ago

You should select it on show event.

        $('#your_repeater').repeater({            
            initEmpty: false,
            isFirstItemUndeletable: true,
            show: function () {
                $(this).find('select').val('whatever-option-value-you-like-to-be-selected');
                $(this).slideDown();
            },
            hide: function (deleteElement) {                
                $(this).slideUp(deleteElement);
            }

        });