Skip to content

Commit

Permalink
rename docs + add double bang to length
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Mar 22, 2022
1 parent a1ff50b commit 7ae3735
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
<StickyPanel ref={containerRef} width={filterBarWidth}>
<ErrorBoundary>
<FilterBar
filtersOpen={!!dashboardFiltersOpen}
filtersOpen={dashboardFiltersOpen}
toggleFiltersBar={toggleDashboardFiltersOpen}
directPathToChild={directPathToChild}
width={filterBarWidth}
Expand Down Expand Up @@ -407,7 +407,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
>
<StyledDashboardContent
className="dashboard-content"
dashboardFiltersOpen={!!dashboardFiltersOpen}
dashboardFiltersOpen={dashboardFiltersOpen}
editMode={editMode}
nativeFiltersEnabled={nativeFiltersEnabled}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 7ae3735

Please sign in to comment.