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?



  • 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

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

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion