ClickOutsideWrapper class

Signature

  1. export declare class ClickOutsideWrapper extends PureComponent<Props, State>

Import

  1. import { ClickOutsideWrapper } from '@grafana/ui';

Properties

PropertyModifiersTypeDescription
defaultPropsstatic{
includeButtonPress: boolean;
parent: (Window & typeof globalThis) | null;
useCapture: boolean;
}
myRefReact.RefObject<HTMLDivElement>
onOutsideClick(event: any) => void
state{
hasEventListener: boolean;
}

Methods

MethodModifiersDescription
componentDidMount()
componentWillUnmount()
render()

defaultProps property

Signature

  1. static defaultProps: {
  2. includeButtonPress: boolean;
  3. parent: (Window & typeof globalThis) | null;
  4. useCapture: boolean;
  5. };

myRef property

Signature

  1. myRef: React.RefObject<HTMLDivElement>;

onOutsideClick property

Signature

  1. onOutsideClick: (event: any) => void;

state property

Signature

  1. state: {
  2. hasEventListener: boolean;
  3. };

componentDidMount method

Signature

  1. componentDidMount(): void;

Returns:

void

componentWillUnmount method

Signature

  1. componentWillUnmount(): void;

Returns:

void

render method

Signature

  1. render(): JSX.Element;

Returns:

JSX.Element