Renderer not working in handsontable using Angular

Tags: #<Tag:0x00007f8b1ccd4ac0>

Hi team,
I am using Handsontable in my Angular application.
I am using Custom Renderer for Cell Formatting as below :

This was working well till few days but now this is not working. Also it is not giving any errors in console.

Is there any alternative to use custom renderer?

Hi @nemilshah2304

Thank you for contacting us. Did you update Handsontable or Angular during that time? Everything looks correct from the pictures you sent.

Yes.
I had upgraded handsontable from 12.0.1 to 12.2.0

I’ve checked and our example with Angular works fine with Handsontable 12.2.0:

https://jsfiddle.net/aszymanski/b4qa1wf0/

I suggest to do a clean installation of the newest version (and removing node modules). If that won’t help you can send us a package with your project, if possible, so we can see locally what might be wrong. Please contact us at support@handsontable.com then.

Hi @adrian.szymanski,
I have referred the same JSFiddle example for creating customRenderer.
I did clean installation of newer version of handsontable after removing node_modules/ folder and still did not got any success.
I also added some console.log() in the renderer function and the logs aren’t getting printed.So,it appears that the function is not getting called.
Can you give me any alternate example of customRenderer for cell Formatting?

Hi @nemilshah2304

If you want to just customize the formatting, you can use cells option to attach your custom CSS class to desired cells (or full rows/columns). Here’s an example:

https://jsfiddle.net/aszymanski/mkv0nzoL/11/

Hi @adrian.szymanski,
Thanks for quick response.
I am formatting the cells dynamically based on the value for other cells data as I have shown in the renderer function above.
Is it possible to add that logic in cells function? If yes, can you provide any example with that?

Hi @nemilshah2304

I see, in that way the best solution was that custom renderer. As I mentioned, it should work fine after the upgrade so maybe the best idea would be to share your project with us at the mail I wrote earlier.

If Angular doesn’t work, try to use React. Look here: https://jaydevs.com/angular-vs-react/