Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoveArrayAction does not update child controls ID #41

Closed
lucax88x opened this issue Feb 1, 2018 · 3 comments
Closed

RemoveArrayAction does not update child controls ID #41

lucax88x opened this issue Feb 1, 2018 · 3 comments
Labels

Comments

@lucax88x
Copy link
Contributor

lucax88x commented Feb 1, 2018

Ciao Wolfz :)

I'm handling an array of entities, and I have a remove button on each entity row, so for example, when I have 3 rows I can remove the middle one, and so on.

What's going on is that when I dispatch a RemoveArray action it's indeed updating the ID of the subsequents items, but not the id of their inner controls.

simple example is below:

3 items on array, with nested fields of Name & Surname

    ITEM0
     Name0
     Surname0
    ITEM1
     Name1
     Surname1
    ITEM2
     Name2
     Surname2

we now remove ITEM1 with a Remove_Array action from the library, ITEM2 gets correctly renamed to ITEM1, but the nested fields remains the same.

    ITEM0
     Name0
     Surname0
    ITEM1
     Name2
     Surname2

we now add a 3rd item, it's get ITEM2, and the nested fields? guess it..

    ITEM0
     Name0
     Surname0
    ITEM1
     Name2
     Surname2
    ITEM2
     Name2
     Surname2

This situation now leads to duplicated data, because when I modify Name on ITEM1 also modifies the one in ITEM2.

Regards,
Luca

@MrWolfZ MrWolfZ added the bug label Feb 1, 2018
@MrWolfZ
Copy link
Owner

MrWolfZ commented Feb 1, 2018

Thanks for finding and reporting this bug. I'll work on a fix asap.

@MrWolfZ
Copy link
Owner

MrWolfZ commented Feb 3, 2018

I have just released version 2.3.0 which fixes this issue.

@MrWolfZ MrWolfZ closed this as completed Feb 3, 2018
@lucax88x
Copy link
Contributor Author

lucax88x commented Feb 5, 2018

Works, thanks man 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants