Hello, I have a Raw Data Table with a column that contains URLs. Is it possible to make these URLs clickable so that clicking on one opens it in a new browser tab?
What you’re looking for is the customCellFormat property. It allows you to render URL fields as clickable links, and it can also render images if the URL points to an image.
Here’s a simple example:
.set("customCellFormat", [
{ field: "your_field", type: "url" },
])
With this configuration, the your_field column will be displayed as a clickable link that opens in a new tab.
Great, thanks. In my case, the URL points to an image. I initially expected it to open in a new tab to view the image, but after applying your configuration, the URL is clickable while the image itself is not rendered. I still need to click the link to open the image.
I see. In that case, you can render the image directly in the Raw Data Table by changing the type from url to img, like this:
.set("customCellFormat", [
{ field: "your_field", type: "img" },
])
With this configuration, the image will be displayed inline instead of as a clickable URL.
Awesome, that solved it. Thanks a lot!