AfterRender fires multiple times

Tags: #<Tag:0x00007efc65699340> #<Tag:0x00007efc656991d8>

Hello!

I am facing an issue with the afterrender function. Inside the afterrender, I attached a loop that adds event listener to an element. Now, everytime the afterrender is executed, the addeventlistener also gets executed which leads to multiple events in an element. How do i stop this? I have tried to put a flagging but the next time the afterrender is executed, the events are no longer working.

Hi @grey

This is caused by the current Handsontable’s rendering engine. The table is fully re-rendered with every action done within it. This is why this hook is fired multiple times and putting a loop inside isn’t recommended.

If you can share more details about your requirements we will be able to suggest different approach.

Hi @grey

do we have any details regarding the following case?