I have two problems in my usage of the main component.
-
I am offering editing of data using the editing features of
tabulator
. When I edit, I lose my scroll positions with the main component. To fix this, I added a wrapper component which wrapsReactTabulator
and makes the required checks inshouldComponentUpdate()
routine. Only when the appropriate props change, I return astrue
. So, when I normally edit the data, I always returnfalse
so that I don't lose scroll positions. For this, I don't actually need any changes toreact-tabulator
per se. -
There are other props, that I want to change and pass on the changed values to the
tabulator
table. However, I am unable to get that to work properly. Probably because the table is rendered only once whencomponentDidMount()
routine. To fix this, I added a very hacky way to just re-render the table in thecomponentDidUpdate()
routine: I simplydestroy()
the old table and re-render the new table by callingcomponentDidMount()
again. This is sufficient for my purpose. I'm sure there is a better way to fix this maybe.