Skip to content
Snippets Groups Projects
Unverified Commit f481cad3 authored by Phoomparin Mano's avatar Phoomparin Mano Committed by GitHub
Browse files

fix(sdk): hide downloads by default (#48755)

* hide downloads by default in the sdk

* update readme to reflect withDownloads prop

* update readme formatting

* update tests
parent 6db14952
No related branches found
No related tags found
No related merge requests found
......@@ -437,7 +437,7 @@ After the SDK is configured, you can embed your dashboard using the `StaticDashb
option, use a `string` value, and use a list of strings for multiple options.
- **withTitle**: `boolean` – Whether the dashboard should display a title.
- **withCardTitle**: `boolean` – Whether the dashboard cards should display a title.
- **withDownloads**: `boolean | null` – Whether to hide the download button.
- **withDownloads**: `boolean | null` – Whether to show the download button. Defaults to `false`.
- **hiddenParameters**: `string[] | null` – A list of parameters that will not be shown in the set of parameter
filters. [More information here](https://www.metabase.com/docs/latest/questions/sharing/public-links#filter-parameters)
- **onLoad**: `(dashboard: Dashboard | null) => void;` - event handler that triggers after dashboard loads with all
......@@ -488,7 +488,7 @@ After the SDK is configured, you can embed your dashboard using the `Interactive
option, use a `string` value, and use a list of strings for multiple options.
- **withTitle**: `boolean` – Whether the dashboard should display a title.
- **withCardTitle**: `boolean` – Whether the dashboard cards should display a title.
- **withDownloads**: `boolean | null` – Whether to hide the download button.
- **withDownloads**: `boolean | null` – Whether to show the download button. Defaults to `false`.
- **hiddenParameters**: `string[] | null` – A list of parameters that will not be shown in the set of parameter
filters. (More information
here)[https://www.metabase.com/docs/latest/questions/sharing/public-links#filter-parameters]
......@@ -610,7 +610,7 @@ component.
Collection Browser to return data
- **initialParameterValues**: `Record<string, string | string[]>` – Query parameters for the dashboard. For a single
option, use a `string` value, and use a list of strings for multiple options.
- **withDownloads**: `boolean | null` – Whether to hide the download button.
- **withDownloads**: `boolean | null` – Whether to show the download button. Defaults to `false`.
- **questionHeight**: `number | null` – Height of a question component when drilled from the dashboard to a question
level.
- **plugins** `{ dashcardMenu?: Object, mapQuestionClickActions?: Function } | null` – Additional mapper function to
......@@ -679,7 +679,7 @@ With the Collection Browser, you can browse the items in your Metabase instance
in `http://localhost:3000/collection/1-my-collection` would be `1`. If no ID is provided, the collection browser will
start at the root `Our analytics` collection, which is ID = 0.
- **onClick**: `(item: CollectionItem) => void` - An optional click handler that emits the clicked entity.
- **pageSize**: `number` – The number of items to display per page. The default is 25.
- **pageSize**: `number` – The number of items to display per page. Defaults to 25.
- **visibleEntityTypes**: `("question" | "model" | "dashboard" | "collection")[]` – the types of entities that should be
visible. If not provided, all entities will be shown.
......
......@@ -30,7 +30,7 @@ export type EditableDashboardProps = {
export const EditableDashboard = ({
dashboardId,
initialParameterValues = {},
withDownloads = true,
withDownloads = false,
questionHeight,
plugins,
onLoad,
......
......@@ -34,7 +34,7 @@ const InteractiveDashboardInner = ({
initialParameterValues = {},
withTitle = true,
withCardTitle = true,
withDownloads = true,
withDownloads = false,
hiddenParameters = [],
questionHeight,
plugins,
......
......@@ -26,7 +26,7 @@ export const StaticDashboardInner = ({
initialParameterValues = {},
withTitle = true,
withCardTitle = true,
withDownloads = true,
withDownloads = false,
hiddenParameters = [],
onLoad,
onLoadWithoutCards,
......
......@@ -10,6 +10,9 @@ export default {
export const DeLocale = () => (
<MetabaseProvider config={storybookSdkDefaultConfig} locale="de">
<StaticDashboard dashboardId={(window as any).DASHBOARD_ID || 1} />
<StaticDashboard
dashboardId={(window as any).DASHBOARD_ID || 1}
withDownloads
/>
</MetabaseProvider>
);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment