aurelia-ui-toolkits / aurelia-kendoui-bridge

MIT License
117 stars 31 forks source link

fixedGroupTemplate not working on dropdownlist #793

Open Xenope opened 5 years ago

Xenope commented 5 years ago

As you can see on the gist below the fixedGroupTemplate does not handle the binding :

https://gist.run/?id=2f63f1cf51d7965775e6c73a331f4baf

We should have the country displayed instead of ${Country}.

arnederuwe commented 5 years ago

there is a hook kendo calls each time a template is used. Unfortunately, this hook isn't used consistently across kendo. Therefore, sometimes we cannot hook the aurelia templating engine to the kendo controls. It seems this is such a case, you can circumvent this by telling the bridge not to use aurelia templates and use the kendo templating system instead: https://gist.run/?id=900b2316f17327489a9a582b3d119cbd

Xenope commented 5 years ago

In my case I'm binding the fixedGroupTemplate in the viewModel like that :

if (kFixedGroupHeaderTemplate != null) { this.akComponent.kFixedGroupTemplate = function() { return kFixedGroupHeaderTemplate; }; }

and not via the html tag, how can I make the workaround to work like you did?

arnederuwe commented 5 years ago

It should work the same when you assign a string to kFixedGroupHeaderTemplate. You will have to refresh the dropdownlist when you dynamically change the template after the component is rendered though

Xenope commented 5 years ago

Ok , but where should I put this "kendo-template" flag to true, i'm not using the <ak-template> tag