[Infra UI] Stop click propagation on tooltip (#161565)

fixes [#161553](https://github.com/elastic/kibana/issues/161553)

## Summary

Fixes click event on the tooltip content



13c8fde1-7dfe-4fb0-92f2-b3e45bd36972


### How to test

- Start a local Kibana instance
- Navigate to `Infrastructure` > `Hosts`
- Click on the `?` icon in the table column headers and then click on
the content. It must not sort the table
This commit is contained in:
Carlos Crespo 2023-07-10 19:32:11 +02:00 committed by GitHub
parent a691f9b5e9
commit 6c2170d385
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,8 +19,12 @@ interface Props extends Pick<HTMLAttributes<HTMLDivElement>, 'style'> {
export const TooltipContent = React.memo(
({ description, formula, showDocumentationLink = false, style }: Props) => {
const onClick = (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
e.stopPropagation();
};
return (
<EuiText size="xs" style={style}>
<EuiText size="xs" style={style} onClick={onClick}>
<p>{description}</p>
{formula && (
<p>