Hi Yaroslav!
Thanks for getting back to me so quickly (:D
That isn't actually want I need. My foreach binding is based on an
observableArray of value objects, in this case room groups in a games lobby.
The click binding passes the associated VO for each group to the handler so
that it can switch groups.
<div id="groups" data-bind="foreach: { data:groups(), as: 'group'}">
<div class="groupTab" data-bind="click: $parent.joinGroup>
<span class="groupName" data-bind="text:
group.name"></span>
</div>
</div>
...
function joinGroup(groupVO)
{
_model.currentGroup(groupVO);
}
I guess I could search through the groups array based on the groupName using
your example. But, as it is, the bind($data, $data) method will work.
Thanks again
Matt