Trying React Renderer - cellMeta gets reset, can't use multiselect

Tags: #<Tag:0x00007efc6adc3620> #<Tag:0x00007efc6adc3418>

Hello Handsontable Team,

I am trying to evaluate this library for my react app.

My usecase involves a non-table visualization and a table visualization of the same data.
ie, selecting a row in table -> selects the row on the other side and vice versa

I also need validations, error indication, custom formulas, filters etc.

I have been able to create this code demo
https://codesandbox.io/p/devbox/mystifying-panna-86ggyk

However, I am facing some issues

  1. If validation fails, Im unable to get consistent visual feedback, I see cellMeta gets reset. I sometimes see the red border but it goes away as soon as I perform any other operation, as simple as selecting another row.

  2. Im unable to use multi select functionality for non-adjacent rows. Is this due to my state update logic, but the selected rows are able to display correctly, why are the table cells not

And some questions

  1. I have found that the complete table cells re-render at every change even with react wrapper, is that so, how is that beneficial in react

  2. You are launching a new react-wrapper by end of the year, if you could mention some main supporting features, it will help us make a decision

Thank you

1 Like

Hi @saad

Thank you for contacting us. I checked your code demo and I can see that you already implemented some custom functionalities.

We have an issue related to the cell meta resetting after validation already reported internally, but it has yet to be fixed. The issue with not being able to select the non-adjacent cells might be caused by your custom logic within the afterSelectionEnd hook and, as you mentioned, updating the state, which resets the selection in general in this case.

About the re-rendering question. This behavior occurs by design. We are aware of its flaws and have plans to change it, but we don’t have a timeline for this project yet.

In regard to the new React wrapper. It’s still in the works, but it’s main purpose is to be fully support React’s functional components. The issues reported by you and other users using the functional components seems to be connected so we hope that the new version of our wrapper will solve them. We will keep in mind the problems you mentioned while testing.