The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
docs - handleLink in mod embeds (#69255)
Jeff Bruemmer33a572f9a60c
diff --git a/docs/embedding/components.md b/docs/embedding/components.mdindex bc8563866ac..22b265b73c3 100644--- a/docs/embedding/components.md+++ b/docs/embedding/components.md@@ -36,6 +36,7 @@ To render a dashboard:- `with-subscriptions` - let people set up [dashboard subscriptions](../dashboards/subscriptions.md). Unlike subscriptions sent from non-embedded dashboards, subscriptions sent from embedded dashboards exclude links to Metabase items, as Metabase assumes the recipient lacks access to the embedded Metabase.- `refresh` - auto-refreshes the dashboard. `refresh="60"` will refresh the dashboard every 60 seconds.- `hidden-parameters` - list of filter names to hide from the dashboard, like `['productId']`+- `enable-entity-navigation` (default is false) - preserves dashboard custom [click behaviors](../dashboards/interactive.md#customizing-click-behavior) that navigate to other dashboards and questions within the embed. Requires `drills` to be true (which is the default). When disabled, only external URL links are kept. See also [`handleLink`](./sdk/plugins.md#handlelink) for customizing what happens when people click URL links.For all modular embeds, you can also set a `locale` in your page-level configuration to [translate embedded content](./translations.md), including content from translation dictionaries.diff --git a/docs/embedding/modular-embedding.md b/docs/embedding/modular-embedding.mdindex 951ee0a904f..b48f576eeb0 100644--- a/docs/embedding/modular-embedding.md+++ b/docs/embedding/modular-embedding.md@@ -187,6 +187,10 @@ To define the configuration that applies to every embed on the page, use the `de- `fetchRequestToken: () => Promise<{ jwt: string }>` (optional) - you can customize how the SDK fetches the refresh token for JWT authentication by specifying the `fetchRequestToken` function. See [customizing JWT authentication](./authentication.md#customizing-jwt-authentication).+- `pluginsConfig` : plugins to customize the behavior of embedded components. Use the `handleLink` function to customize what happens when people click a link in your embedded questions and dashboards. For details on the `handleLink` API, including code examples, see [`handleLink` plugin](./sdk/plugins.md#handlelink).++## AuthenticationFor authentication setup including API keys for local testing, SSO with JWT/SAML, and cross-domain configuration, see [Modular embedding - authentication](./authentication.md).+diff --git a/docs/embedding/sdk/introduction.md b/docs/embedding/sdk/introduction.mdindex 2cc4c567951..167c8c745ae 100644--- a/docs/embedding/sdk/introduction.md+++ b/docs/embedding/sdk/introduction.md@@ -118,7 +118,7 @@ The SDK doesn't support:- Verified content- Official collections-- Click behavior with custom destinations to other items in the same Metabase (like to other questions or dashboards)+- Dashboard link cards- Server-side rendering (SSR)Other limitations:diff --git a/docs/embedding/sdk/plugins.md b/docs/embedding/sdk/plugins.mdindex 40117da7780..6ab4dea1915 100644--- a/docs/embedding/sdk/plugins.md+++ b/docs/embedding/sdk/plugins.md@@ -48,7 +48,13 @@ To customize what happens when people click a link in your embedded questions an{% include_file "{{ dirname }}/snippets/plugins/handlelink.tsx" snippet="example" %}```-The plugin `handleLink` can only be used [globally](#plugin-scope) on provider level.+By default, links open in a new tab. Use `handleLink` to intercept link clicks — for example, to open a URL in a modal or navigate within your app using your router.++The function receives a URL string. Return `{ handled: true }` to prevent default navigation, or `{ handled: false }` to open the link in a new tab.++The plugin `handleLink` can only be used [globally](#plugin-scope) on provider level. `handleLink` is also available in [modular embedding](../modular-embedding.md#page-level-config) via `pluginsConfig` in `defineMetabaseConfig`, with the same API.++To create clickable links in your table columns, set the column's formatting to [display as link](../../data-modeling/formatting.md#display-as).### `getNoDataIllustration` and `getNoObjectIllustration`