mirror of
https://github.com/apache/superset.git
synced 2024-09-07 06:17:45 -04:00
fix: Hide FiltersPanel in standalone mode 3 (#23811)
This commit is contained in:
parent
314987f32d
commit
8a88ab3c4b
@ -153,11 +153,12 @@ const StyledDiv = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
// @z-index-above-dashboard-charts + 1 = 11
|
// @z-index-above-dashboard-charts + 1 = 11
|
||||||
const FiltersPanel = styled.div<{ width: number }>`
|
const FiltersPanel = styled.div<{ width: number; hidden: boolean }>`
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
grid-row: 1 / span 2;
|
grid-row: 1 / span 2;
|
||||||
z-index: 11;
|
z-index: 11;
|
||||||
width: ${({ width }) => width}px;
|
width: ${({ width }) => width}px;
|
||||||
|
${({ hidden }) => hidden && `display: none;`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StickyPanel = styled.div<{ width: number }>`
|
const StickyPanel = styled.div<{ width: number }>`
|
||||||
@ -654,6 +655,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
|
|||||||
return (
|
return (
|
||||||
<FiltersPanel
|
<FiltersPanel
|
||||||
width={filterBarWidth}
|
width={filterBarWidth}
|
||||||
|
hidden={isReport}
|
||||||
data-test="dashboard-filters-panel"
|
data-test="dashboard-filters-panel"
|
||||||
>
|
>
|
||||||
<StickyPanel ref={containerRef} width={filterBarWidth}>
|
<StickyPanel ref={containerRef} width={filterBarWidth}>
|
||||||
@ -667,7 +669,6 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
|
|||||||
height: filterBarHeight,
|
height: filterBarHeight,
|
||||||
offset: filterBarOffset,
|
offset: filterBarOffset,
|
||||||
}}
|
}}
|
||||||
hidden={isReport}
|
|
||||||
/>
|
/>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
</StickyPanel>
|
</StickyPanel>
|
||||||
|
@ -52,6 +52,8 @@ import ActionButtons from './ActionButtons';
|
|||||||
import Horizontal from './Horizontal';
|
import Horizontal from './Horizontal';
|
||||||
import Vertical from './Vertical';
|
import Vertical from './Vertical';
|
||||||
|
|
||||||
|
// FilterBar is just being hidden as it must still
|
||||||
|
// render fully due to encapsulated logics
|
||||||
const HiddenFilterBar = styled.div`
|
const HiddenFilterBar = styled.div`
|
||||||
display: none;
|
display: none;
|
||||||
`;
|
`;
|
||||||
|
Loading…
Reference in New Issue
Block a user