Description/Context:
I’m using the Table component’s “link” column type alongside the “click cell” event handler to navigate to different pages/apps/URLs. However, my end-users expect that holding Ctrl (or Cmd on Mac) while clicking a link will open it in a new tab, while a normal click opens it in the current tab. This is a common convention in browsers and standard HTML links, but currently, there’s no easy way to replicate this behavior with Retool’s link columns.
Current Workarounds:
- If I only need to open a URL, I can replace the link column with a custom HTML column that uses plain
<a>
tags:
<a href="baseUrl/{{ item }}">{{ item }}</a>
This supports the typical “Ctrl+Click to open in new tab” behavior. However, it loses the styling and configuration convenience offered by the link column type.
- For “Go to page” or “Go to app” actions, there’s no straightforward workaround in HTML that preserves the Retool behavior while adding a Ctrl+Click new-tab option.
Proposed Solutions:
- Add a Toggle – Introduce an option in the Table’s link column settings (or the event handler settings) that allows “Open in new tab on Ctrl+Click” while continuing to open in the same tab on a normal click.
- API to Detect Key Press – Provide a way for event handlers to detect which key modifiers (Ctrl, Shift, etc.) are pressed, so we could programmatically decide whether to open in a new tab or the same tab.