From 7ae3735638e1070f3d99873159ee503ed7595b12 Mon Sep 17 00:00:00 2001 From: Ville Brofeldt Date: Tue, 22 Mar 2022 09:50:21 +0200 Subject: [PATCH] rename docs + add double bang to length --- .../creating-your-first-dashboard.mdx | 14 +++++++------- .../DashboardBuilder/DashboardBuilder.tsx | 4 ++-- .../dashboard/components/DashboardBuilder/state.ts | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/docs/creating-charts-dashboards/creating-your-first-dashboard.mdx b/docs/docs/creating-charts-dashboards/creating-your-first-dashboard.mdx index 960c6719fbd7..39400a1c2903 100644 --- a/docs/docs/creating-charts-dashboards/creating-your-first-dashboard.mdx +++ b/docs/docs/creating-charts-dashboards/creating-your-first-dashboard.mdx @@ -197,15 +197,15 @@ The following URL parameters can be used to modify how the dashboard is rendered - `0` (default): dashboard is displayed normally - `1`: Top Navigation is hidden - `2`: Top Navigation + title is hidden - - `3`: Top Navigation + title + top level tab is hidden + - `3`: Top Navigation + title + top level tabs are hidden - `show_filters`: - - `0`: render dashboard without Filter Tab - - `1` (default): render dashboard with Filter Tab if native filters are enabled + - `0`: render dashboard without Filter Bar + - `1` (default): render dashboard with Filter Bar if native filters are enabled - `expand_filters`: - - (default): render dashboard with Filter Tab expanded if there are native filters - - `0`: render dashboard with Filter Tab collapsed - - `1`: render dashboard with Filter Tab expanded + - (default): render dashboard with Filter Bar expanded if there are native filters + - `0`: render dashboard with Filter Bar collapsed + - `1`: render dashboard with Filter Bar expanded For example, when running the local development build, the following will disable the -Top Nav and remove the Filter Tab: +Top Nav and remove the Filter Bar: `http://localhost:8088/superset/dashboard/my-dashboard/?standalone=1&show_filters=0` diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx index 58c4f289a93f..4f7ef563ce55 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx @@ -350,7 +350,7 @@ const DashboardBuilder: FC = () => { = () => { > diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/state.ts b/superset-frontend/src/dashboard/components/DashboardBuilder/state.ts index c361f4d30a49..676ffd45ccac 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/state.ts +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/state.ts @@ -45,7 +45,7 @@ export const useNativeFilters = () => { const filterValues = Object.values(filters); const expandFilters = getUrlParam(URL_PARAMS.expandFilters); const [dashboardFiltersOpen, setDashboardFiltersOpen] = useState( - expandFilters ?? filterValues.length, + expandFilters ?? !!filterValues.length, ); const nativeFiltersEnabled =