fix: Hide FiltersPanel in standalone mode 3 (#23811)

This commit is contained in:
Geido 2023-04-26 11:06:58 +03:00 committed by GitHub
parent 314987f32d
commit 8a88ab3c4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -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 }>`
@ -654,6 +655,7 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
return (
<FiltersPanel
width={filterBarWidth}
hidden={isReport}
data-test="dashboard-filters-panel"
>
<StickyPanel ref={containerRef} width={filterBarWidth}>
@ -667,7 +669,6 @@ const DashboardBuilder: FC<DashboardBuilderProps> = () => {
height: filterBarHeight,
offset: filterBarOffset,
}}
hidden={isReport}
/>
</ErrorBoundary>
</StickyPanel>

View File

@ -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;
`;