Prevent event propagation on step_duration (#122039) (#122065)

Co-authored-by: Emilio Alvarez Piñeiro <95703246+emilioalvap@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2021-12-28 05:57:31 -05:00 committed by GitHub
parent d4e31e25d2
commit c6f8b2f7a0
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)}