Keyboard tree woes.

28 views
Skip to first unread message

Ryan Leach

unread,
Apr 17, 2017, 9:52:43 PM4/17/17
to KnockoutJS
I'm having difficulty understanding what I've done wrong when defining the hasFocus binding on the node.

https://jsbin.com/pobadureme/edit?html,console,output

Something is clearly wrong with my binding context / vm as when I debug with the chrome extension knockout context debugger, I can see clearly that the selected observable isn't available.

What am I fundamentally missing?

Thanks,

Ryan Leach

Michael Best

unread,
Apr 20, 2017, 2:30:07 AM4/20/17
to KnockoutJS
I'm not familiar with the mapping plugin, but I noticed a number of errors in your code.

self = this;

should be

var self = this;


template: {name: 'nodeTemplate', data:data

should be

template: {name: 'nodeTemplate', data:tree
Reply all
Reply to author
Forward
0 new messages