Skip to content

Commit

Permalink
fix: Hide FiltersPanel in standalone mode 3 (apache#23811)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8a88ab3)
  • Loading branch information
geido authored and jinghua-qa committed Apr 27, 2023
1 parent 0a48743 commit edbbf2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,12 @@ const StyledDiv = styled.div`
`;

// @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-row: 1 / span 2;
z-index: 11;
width: ${({ width }) => width}px;
${({ hidden }) => hidden && `display: none;`}
`;

const StickyPanel = styled.div<{ width: number }>`
Expand Down Expand Up @@ -654,6 +655,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
return (
<FiltersPanel
width={filterBarWidth}
hidden={isReport}
data-test="dashboard-filters-panel"
>
<StickyPanel ref={containerRef} width={filterBarWidth}>
Expand All @@ -667,7 +669,6 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
height: filterBarHeight,
offset: filterBarOffset,
}}
hidden={isReport}
/>
</ErrorBoundary>
</StickyPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ import ActionButtons from './ActionButtons';
import Horizontal from './Horizontal';
import Vertical from './Vertical';

// FilterBar is just being hidden as it must still
// render fully due to encapsulated logics
const HiddenFilterBar = styled.div`
display: none;
`;
Expand Down

0 comments on commit edbbf2e

Please sign in to comment.