how to use "onItemRender" event.

How is the “onItemRender” event intend to be used?

I am trying to do some custom rendering for each item in a menu. I would expect the onItemRender event to have two parameters dataItem: MenuItem and itemElement: HtmlElement. The second parameter would give me access to the dom element rendered for the item. The dom element reference however is not there.

That would give me the posibility to do some additional rendering on the htmlElement based on the dataItem.

Simple text based templating is not sufficient for my goal.

Is this possible in some way?

Greetings,

Hello, @Williwyg

onItemRender event serves as an indicator that the item has been rendered.
To solve your issue, we would recommend you to use template as a function if simple text-based templating is not sufficient for your goal.
Here is the snippet Code Snippet

In case that won’t help, could you, please, specify your issue or provide a snippet?