themeum / kirki

Extending the customizer
https://kirki.org
MIT License
1.26k stars 327 forks source link

repeater control #2399

Open sauravxtha opened 3 years ago

sauravxtha commented 3 years ago

Issue description:

After creating a brand new repeater the 1st one created automatically dosent work. but everything works well after deleating the first automatically created one. is it intended to work that way or am i doing something wrong please help.

Version used:

3.1.8

Using theme_mods or options?

theme_mod

Code to reproduce the issue (config + field(s))

Kirki::add_field(
    'beatsmandu_kirki_config',
    array(
        'type'         => 'repeater',
        'label'        => esc_html__( 'Services', 'beatsmandu' ),
        'section'      => 'frontpage_services',
        'row_label'    => array(
            'type'  => 'text',
            'value' => esc_html__( 'Service', 'beatsmandu' ),
        ),
        'button_label' => esc_html__( 'Add New Service', 'beatsmandu' ),
        'settings'     => 'services',
        'fields'       => array(
            'image'       => array(
                'type'  => 'image',
                'label' => esc_html__( 'Image', 'beatsmandu' ),
            ),
            'title'       => array(
                'type'  => 'text',
                'label' => esc_html__( 'Service Title', 'beatsmandu' ),
            ),
            'description' => array(
                'type'  => 'textarea',
                'label' => esc_html__( 'Service Description', 'beatsmandu' ),
            ),
        ),
    )
);
AlxMedia commented 2 years ago

I'm experiencing the same issue with several people reporting this. @MapSteps , any idea what is going on here?

A potential fix could perhaps be to stop the repeater from auto-creating the first item.

AlxMedia commented 2 years ago

@contactjavas - any chance to get a fix for this in Beta 3?

contactjavas commented 2 years ago

Hi @sauravxtha & @AlxMedia , just want to confirm, this is still an issue in v4.0.22 right?

AlxMedia commented 2 years ago

@contactjavas Sorry for a late reply, I can confirm the issue still exist in 4.0.22.