Skip to content

Removing an invalid array item doesn't work properly #750

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

Closed
MGouaillier4CT opened this issue Aug 2, 2016 · 3 comments
Closed

Removing an invalid array item doesn't work properly #750

MGouaillier4CT opened this issue Aug 2, 2016 · 3 comments

Comments

@MGouaillier4CT
Copy link

MGouaillier4CT commented Aug 2, 2016

Hi !
I have this issue when using the array type of angular schema form.
When you add two or more items to an arrray and fill them with invalid values, the deletion process is not working correctly.

See video example here : http://recordit.co/xCDIUi3L8S
See angular schema form demo here : http://schemaform.io/examples/bootstrap-example.html#/e32e956f05ed01bc216aec559f5126e5

I tried to set the destroyStrategy to different values, but, to my knowledge, nothing seems to solve this issue.

I think this issue is highly related to #732
@json-schema-form/angular-schema-form-lead

@nicklasb nicklasb changed the title Remove invalid array item bug Removing an invalid array item doesn't work properly Aug 15, 2016
@nicklasb
Copy link
Member

Hi, your links didn't work, fixed them for you.

@nicklasb
Copy link
Member

nicklasb commented Aug 15, 2016

Agreed, it just deletes the last in the list, it doesn't expect more items to be added, probably.

Anthropic added a commit that referenced this issue Apr 2, 2017
@Anthropic Anthropic added this to the 1.0.0 milestone Apr 2, 2017
@Anthropic
Copy link
Member

@MGouaillier this was an easy one, array template was using track by $index, needed to be track by $id(item) which uses $$hash instead. I have committed the change for release in alpha 4

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

No branches or pull requests

3 participants