Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Kind is undefined in onChange for nested List #231

Closed
leoasis opened this issue Oct 14, 2015 · 4 comments
Closed

Kind is undefined in onChange for nested List #231

leoasis opened this issue Oct 14, 2015 · 4 comments

Comments

@leoasis
Copy link

leoasis commented Oct 14, 2015

I have a model that is a t.struct that contains a property of t.list of t.struct which in turn contains a property that is a t.list. So basically a list inside a struct inside a list inside a struct :P

Whenever I add or remove an item in the nested list, the onChange callback for the form returns with a kind of undefined, which is incorrect and should be add or remove respectively. This works fine with top level lists, but it fails when the list is inside a struct inside another list. I've tracked this to the onItemChange function in the List component, which doesn't take into account if the change is from a nested list, and completely discards the kind.

@gcanti
Copy link
Owner

gcanti commented Oct 14, 2015

Hi @leoasis, good catch! Thanks.
Just pushed a fix to master and 0.6.x branches.

@leoasis
Copy link
Author

leoasis commented Oct 14, 2015

@gcanti thanks! I'm really impressed by the speed in which you address all the issues! Thanks a lot again and awesome job

@gcanti
Copy link
Owner

gcanti commented Oct 14, 2015

Well, you helped me a lot with your detailed description, thanks again.

@gcanti gcanti closed this as completed Oct 14, 2015
@benmonro
Copy link

@gcanti for president!

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

No branches or pull requests

3 participants