Prevent event propagation on step_duration (#122039)

This commit is contained in:
Emilio Alvarez Piñeiro 2021-12-28 10:33:28 +01:00 committed by GitHub
parent 7e7319b007
commit 4c07aba4a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,8 @@
* 2.0.
*/
import type { MouseEvent } from 'react';
import * as React from 'react';
import { EuiButtonEmpty, EuiPopover } from '@elastic/eui';
import { useMemo } from 'react';
@ -55,6 +57,7 @@ export const StepDuration = ({
return (
<EuiPopover
onClick={(evt: MouseEvent<HTMLDivElement>) => evt.stopPropagation()}
isOpen={durationPopoverOpenIndex === step.synthetics.step?.index}
button={button}
closePopover={() => setDurationPopoverOpenIndex(null)}