Custom cell renderers in handsontable-react

Hi,

I am looking for the answer to this question please. It doesn’t work for me and I have the same question as tmmgn1337 regarding where to import the Handsontable renderers from. I tried using:
import Handsontable from ‘handsontable’;
And then referencing them as per the example, but even when I do this the example code doesn’t work.

Many thanks

Hi @asb

My code from How to set a custom cell renderer with Handsontable React? does not work in your project or you are looking for something completely different?

Do you get any console errors or tables does not work properly?

Hi Aleksandra,

In my code, the table renders, but the formats do not apply at all (I just get the default numeric format). I don’t get any console errors.

I’ve made a codepen representing my problem:

https://codepen.io/ahx/pen/gvbPzy?editors=1010

I note that the renderer does seem to applying although it’s appears to be applying randomly to different cells and then stops working when I edit any cell.

Additionally, the codepen settings directly import handsontable from: https://docs.handsontable.com/bower_components/handsontable/dist/handsontable.full.min.js

which is different to my configuration (I have handsontable installed via a dependency of react-handsontable).

Thanks for your help

That is really interesting. I have the exact code on my local machine. I have also tried the new version of Handsontable (0.35.1) and the one before.
I will need to test it a little bit more.

1 Like

Hi,

Have you had a chance to look at this yet? The main reason I am doing this is to override the cell format for read-only cells, so if this is proving difficult to resolve then I can ask another different question which may provide a temporary fix for my project for now.

Many thanks,

The toughest case here is the difference between the local and demo behavior. I did not find a reason why they differ.
We should probably discuss some other options.

I see - in that case, I’ll post a separate question to this in the forum.

Thanks,