Simple way to reproduce
When creating tree for a CTreeView I’m doing a for whit this insidee
$outChildren = array('id' => $childData->companyChildId."_companyChildId",
'text' => $text,
'hasChildren' => true,
'htmlOptions' => array(
'class' => 'trapForBug',
'data-role' => 'anotherTrap',
When rendered, the UL has not the class setted, and has not the ‘data-role’ attribute setted.
I see in documentation that CTreeView has htmlOptions for itself, but inside the data is possible to set htmlOptions for every item.
Follow a tipical json data which NOT render the htmlOptions in the leaf
You can not use htmlOptions in treeview async ajax calls. Only the ‘classes’ of the leaf can be specified in the json response:
Optionally you can modify the framework/web/js/source/jquery.treeview.async.js script to process other leaf attributes or even htmlOptions.
Thanks for reply, but I cannot understand why it’s in the documentation if it’s not an available option !
Any update on this ?
Even I feel it is a bug, since they did not mention that it won’t work for async ajax calls