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

Data structure breaks on row deletion #36

Open
satoved opened this issue May 24, 2019 · 0 comments
Open

Data structure breaks on row deletion #36

satoved opened this issue May 24, 2019 · 0 comments

Comments

@satoved
Copy link

satoved commented May 24, 2019

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

@satoved satoved changed the title Data structures breaks on middle row deletion Data structure breaks on middle row deletion May 24, 2019
@satoved satoved changed the title Data structure breaks on middle row deletion Data structure breaks on row deletion May 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant