Cascade Drop Down - Child doesn't always fire

35 views
Skip to first unread message

David Elliott

unread,
Sep 22, 2015, 8:42:03 AM9/22/15
to KnockoutJS
Here is an working example: http://jsfiddle.net/ayuoky3z/

You will see the 2 parents have a common child -> Number 2.

On Run
.  parent changed to 1
.  child changed to 1

Change to "Parent 2"
.  child changed to 2
.  OnChildChanged
.  parent changed to 2
.  OnParentChanged

Child is updated because there is no value 1

Change to "Parent 1"
.  parent changed to 1
.  OnParentChanged

Child is not updated because there is a value 2


What I want is when the parent changes then the child is notified whether or not it changed.  

I want to get the new value of the parent and child and then call out to an server and update the page.

Any help is appreciated

Gunnar Liljas

unread,
Sep 22, 2015, 4:19:11 PM9/22/15
to knock...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "KnockoutJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knockoutjs+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Elliott

unread,
Sep 23, 2015, 9:22:57 AM9/23/15
to KnockoutJS
Storing the object as opposed to the value does seem to fix this problem.
Thanks
Reply all
Reply to author
Forward
0 new messages