Skip to main content
Elastic UI
Elastic UI
Getting startedComponentsPatternsContentData visualization
EUI ChangelogGitHubFigma
  • Setup
  • Theming
  • Accessibility
  • Testing
  • Utilities
    • Accessibility
    • Auto sizer
    • Color palettes
    • Copy
    • CSS utility classes
    • Delay
    • Error boundary
    • Focus trap
    • Highlight and mark
    • HTML ID generator
    • I18n
    • Inner text
    • Mutation observer
    • Outside click detector
    • Overlay mask
    • Portal
    • Pretty duration
    • Provider
    • Resize observer
    • Scroll
    • Text diff
    • Text truncation
    • Window events
  • EUI
  • Utilities
  • Outside click detector

Outside click detector

Use EuiOutsideClickDetector to trigger a handler when the user clicks outside of the child element.

EuiSelect normalizes browser event inconsistencies with

<select /> elements and as a result may not trigger EuiOutsideClickDetector when targeted with mouse events.

Loading...

Props

EuiOutsideClickDetector

𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
children#
↦
Description and type

ReactNode to render as this component's content

Type: ReactElement<any, string | JSXElementConstructor<any>>
↦
Default value
Required
↵
Prop
onOutsideClick#
↦
Description and type
Type: (event: Event) => void
↦
Default value
Required
↵
Prop
isDisabled#
↦
Description and type
Type: boolean
↦
Default value
↵
Prop
onMouseDown#
↦
Description and type
Type: (event: MouseEvent<Element, MouseEvent>) => void
↦
Default value
↵
Prop
onMouseUp#
↦
Description and type
Type: (event: MouseEvent<Element, MouseEvent>) => void
↦
Default value
↵
Prop
onTouchStart#
↦
Description and type
Type: (event: MouseEvent<Element, MouseEvent>) => void
↦
Default value
↵
Prop
onTouchEnd#
↦
Description and type
Type: (event: MouseEvent<Element, MouseEvent>) => void
↦
Default value
↵
𐘂𐘂
Edit this page

Previous
Mutation observer
Next
Overlay mask
  • Props
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with ❤ by Elastic