afterGetColHeader called when updating state external to the component

Tags: #<Tag:0x00007efc64b3cb50> #<Tag:0x00007efc64b3c9e8>

Hey,

I posted a similar post before around performance and afterGetColHeader performance Custom Column Headers. Anyhow i’m taking another attempt at because we’re still experiencing a few performance issue as we have a lot of logic in our column header such as filtering, sorting. This is not notiable in most cases as we only have a few columns but when we’re rendering a larger amount it’s taking it’s toll and preventing user actions.

afterGetColHeader seems to be called here, when updating state which is not related to the Table instance, or updates to the column header.

You can see it here with the console in the example. I know the composition of the components could be changed, but this still feels odd to me, thats it’s getting called.

https://codesandbox.io/p/sandbox/hansontable-cutom-cell-render-scroll-forked-3v9sr2

Any suggestions on this?

Cheers, James

Hi @james.dale

I checked your example and it seems that changing the checkbox is indeed resetting the state of the table. When you change any value in the cell and then check the checkbox it will reset the table and triggers afterGetColHeader again.

That’s most likely a bug, but I need to investigate it more. Additionally, we are currently working on a new React wrapper for Handsontable, so there is a possibility that it will be solved with its introduction.

Yeah I’m hoping that fixes everything :champagne:

Any ideas of when that is scheduled for?

Cheers, James

@james.dale

Hopefully, soon. I will update you once it’s done.