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

Dynamically added select options are not showing

Open rides90 opened this issue 8 years ago • 1 comments

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

rides90 avatar Sep 21 '17 09:09 rides90

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

        });

Pablo-Araya avatar Oct 18 '18 00:10 Pablo-Araya