Fix DualBrush positioning in embedded panels

This commit is contained in:
Walter Rafelsberger 2024-10-11 18:37:25 +02:00
parent 2c24dbd116
commit 26cd1a53df

View file

@ -426,7 +426,12 @@ export const DocumentCountChart: FC<DocumentCountChartProps> = (props) => {
<> <>
{isBrushVisible && ( {isBrushVisible && (
<div className="aiopsHistogramBrushes" data-test-subj={'aiopsHistogramBrushes'}> <div className="aiopsHistogramBrushes" data-test-subj={'aiopsHistogramBrushes'}>
<div css={{ height: BADGE_HEIGHT }}> {/**
* We need position:relative on this parent container of the BrushBadges,
* because of the absolute positioning of the BrushBadges. Without it, the
* BrushBadges would not be positioned correctly when used in embedded panels.
*/}
<div css={{ height: BADGE_HEIGHT, position: 'relative' }}>
<BrushBadge <BrushBadge
label={ label={
baselineBrush.label ?? baselineBrush.label ??