Skip to content
This repository was archived by the owner on Sep 10, 2019. It is now read-only.
This repository was archived by the owner on Sep 10, 2019. It is now read-only.

Data structure breaks on row deletion #36

@satoved

Description

@satoved

Hi, thanks for a useful package. Found a bug but don't know how to fix, deleteRow function seems ok.

Initial data (I've added 3 states):

image

Hitting remove button on the middle row (NY).

Expected result:
CA => California
MN => Maine

Real result:

image

Code of the field:

Repeater::make('State Differences')->addButtonText('Add state')->addField([
            'label' => 'State',
            'type' => 'select',
            'name' => 'state',
            'options' => array_combine(State::OPTIONS, State::OPTIONS),
            'width' => 'w-1/6',
            'placeholder' => 'State',
        ])->addField([
            'width' => 'w-5/6',
            'label' => 'Difference',
            'type' => 'textarea',
            'name' => 'text',
        ])

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions