I have an application with a table, inside one of the table cells is a Link type, and I have a click handler to open a new tab URL when clicking the text only.
Some change was just rolled out, in the past 24 hours, that now when you click anywhere in the cell containing a link, it triggers the open URL!
How can I revert this, or make it so only clicking the link text opens a URL?
Hello @offpath
You have to use the onclick event on that link not on the table event handler
3 Likes
That's what I was doing, and that's precisely what changed. Because it's a cell handler and there's no way to create an actual link handler. This just changed last week.
@offpath,
Can you provide me with the exported json from your app so i can see what is happening? You can export it like this:
1 Like
We're experiencing this issue too. "Link" cells now trigger events when the cell is clicked, not when the link is clicked.
Yeah it's still broken.
My workaround (cause this is retool and they won't open-source components and take absolutely forever to actually fix things) is making the cell type HTML, and I'm inserting <a href="https://example.com" target="_blank">link text</a>
to get it to work like it did before.
Hi @offpath,
A change was made because previously the event handler on click cell
only triggered when clicking on the actual content in the cell and not just the white space of a cell. So the change enabled the event handlers to occur when a user clicks ANYWHERE on the cell. I have filed a ticket with our engineering team that perhaps this is good for other column types, but not the behavior that you would like to see when the column format is link
.
Meanwhile, I think your workaround with the html format is excellent.
Yeah. I know. That was my bug report. Thanks for the confirmation I guess that your engineers introduced breaking behavior?