Custom Renderer Button onclick not working

Tags: #<Tag:0x00007f8b28ea9038>

I am using the React wrapper and have created a Custom Renderer for a column. In this column I am rendering a Button from Semantic UI Library. It seems I can render it but when I click, the event isn’t triggered and nothing happens.

How can I render a custom Button and trigger a javascript function in my custom renderer?

Hi @mhennessy7

It would be great if you could share a demo where the issue is replicable.

Here is a demo with a button in each cell on the first column - https://codesandbox.io/s/delete-buttons-9z0ov?file=/src/index.js

As you can see, after clicking the row is removed.
But it reacts by afterOnCellMouseDown hook, not listening to an event click.

Yes, I can get similar behavior using afteronCellMouseDown, but it’s not as flexible as being able to have the custom render function contain the button and associated logic. I need to move the associated button click logic …and on different tables, it can be different columns which contain different buttons with different behaviors. So, trying to manage all that logic in afteronCellmousedown becomes messy.

is using a custom renderer to render a javascript button just not supported?

Custom renderer could render a button as well as other HTML elements.

I slightly changed the previous demo to use a custom button - https://codesandbox.io/s/button-to-delete-3ok8z?file=/src/index.js:989-995

Button work as I said earlier.

Does it follow your idea?

Hi @mhennessy7

how’s the progress?

Hi @mhennessy7

I believe that we can close this topic as there are no new comments within more than 2 weeks. However, if you need anything please send me an email to support@handsontable.com