Hi,
I am trying to update some properties of treeview nodes using the code given in cookbook crud example . However I am getting error ‘OJ-Tree-View: Error JET TreeView nodes should not have duplicated keys’ when I wrap the template in <li> tag and update an expanded node. I need to use the <li> tag since I have a search filter that hides treenodes based on a property.
Following is my template
<template slot="itemTemplate" data-oj-as="row">
<oj-bind-if test="[[row.data.hidden != true]]">
<li :id="[[row.data._nodeId]]">
<oj-bind-if test="[[row.data.nodeType === 'empty']]">
<span class="oj-icon-color-disabled oj-ux-ico-folder-remove oj-treeview-icon oj-component-icon"></span>
<span class="oj-text-color-disabled"><oj-bind-text value='[[row.data.title]]'></span>
</oj-bind-if>
<oj-bind-if test="[[row.data.nodeType != 'empty']]">
<span class="oj-treeview-item-icon"></span>
<span class="tree-node-title"><oj-bind-text value='[[row.data.title]]'></span>
</oj-bind-if>
</li>
</oj-bind-if>
<oj-bind-if test="[[row.data.hidden == true]]">
<li :id="[[row.data._nodeId]]" style="display:none">
<span class="oj-treeview-item-icon"></span>
<span><oj-bind-text value='[[row.data.title]]'></span>
</li>
</oj-bind-if>
</template>
Additionaly I observed that this issue is not happening in latest OJET cookbook. I am using OJET 12.1.3. Kindly give me a solution to solve this issue.