Closed LTroya closed 7 years ago
Could you please provide the code where your tree-grid is defined inside your template? Maybe there's something wrong - this code looks like it should do what you expect.
Maybe you can also provide a plunker (or something equivalent) to check whats wrong.
I don't using a template, only the default one.
This is the html
<tree-grid tree-data="ctrl.tree"
col-defs="ctrl.col_defs"
expand-on="ctrl.expanding_property"></tree-grid>
col_defs
vm.col_defs = [
{
field: "clave",
displayName: "Clave",
sortable: true,
filterable: true
}
];
That's the weird part. I see into the directive this code
<span ng-if=\"expandingProperty.cellTemplate\" class=\"indented tree-label\" " +
"ng-click=\"on_user_click(row.branch)\" compile=\"expandingProperty.cellTemplate\"></span>
So this should work without problem.
Yeah, I meant your HTML where the tree is defined.
First I think the cellTemplate
needs to be "one HTML element", you have two. Try to wrap the whole thing inside a div
or a span
. Could you please test this? If this is not working for you, I ask you to provide a simple Plunker where we can debug further.
Second: the cellTemplateScope
is currently not working inside the expandingProperty (as stated in the docs, didn't try to use it before):
expanding_property: this is the property of the objects in tree_data where you want to put the ability to expand and collapse. This accepts an array of the same format as col_defs, allowing for sorting & filtering on the expanding field. This now includes the ability to provide a cellTemplate (but not a cellTemplateScope).
Oh, it works as you say.
Thanks for your help and your explanation.
I am trying to override
expanding_property cellTemplate property
but it is not working. Also I want to add a custom function to it, but it is not working.This is my template