### File

`packages/ecl/components/ecl-popover/ecl-popover.component.ts`

### Description

Component representing an ECL Popover.

It handles toggling visibility, positioning, and closing behavior of the popover.

### Extends

`ECLBaseDirective`

### Implements

`AfterViewInit` `AfterContentInit` `OnDestroy`

### Metadata

HostDirectives | `ECLClickOutsideDirective` Outputs : eclClickOutside
selector | `ecl-popover`
imports | `EUI_ECL_BUTTON` `EUI_ECL_ICON`
templateUrl | `./ecl-popover.component.html`

### Index

###### Properties
eclPopoverContainerElement eclPopoverScrollableElement eclPopoverToggle popoverPosition
###### Methods
handlePushClass onClickOutsidePopover onDocumentScroll onEscapeKeydownHandler getCssClasses
###### Inputs
class e2eAttr tabindex
###### Outputs
closeEvent openEvent
###### HostBindings
class
###### HostListeners
document:keydown.escape document:scroll eclClickOutside
###### Accessors
cssClasses popoverToggleAriaControls

### Inputs

class
Type : `string`

e2eAttr
Type : `any`

tabindex
Type : `number`

### Outputs

closeEvent

openEvent

### HostBindings

class
Type : `string`

### HostListeners

document:keydown.escape
`document:keydown.escape()`
Closes the popover when the Escape key is pressed.

document:scroll
`document:scroll()`
Recalculates popover position when the document is scrolled.

eclClickOutside
`eclClickOutside()`
Handler triggered when a click outside the popover is detected. Closes the popover if it is open.

### Methods

handlePushClass
`handlePushClass(direction: string)`
Check whether the popover is going out of its scrollable container and apply the needed repositioning. Parameters :
Name | Type | Optional
direction | `string` | No
Returns : `void`

onClickOutsidePopover
`onClickOutsidePopover()`
Decorators : `@HostListener('eclClickOutside')`
Handler triggered when a click outside the popover is detected. Closes the popover if it is open. Returns : `void`

onDocumentScroll
`onDocumentScroll()`
Decorators : `@HostListener('document:scroll')`
Recalculates popover position when the document is scrolled. Returns : `void`

onEscapeKeydownHandler
`onEscapeKeydownHandler()`
Decorators : `@HostListener('document:keydown.escape')`
Closes the popover when the Escape key is pressed. Returns : `void`

getCssClasses
`getCssClasses(rootClass: string)`
Parameters :
Name | Type | Optional
rootClass | `string` | No
Returns : `string`

### Properties

eclPopoverContainerElement
Type : `ElementRef`
Decorators : `@ViewChild('container')`
Reference to the popover container element.

eclPopoverScrollableElement
Type : `ElementRef`
Decorators : `@ViewChild('scrollable')`
Reference to the scrollable content element inside the popover.

eclPopoverToggle
Type : `EclPopoverToggleDirective`
Decorators : `@ContentChild(EclPopoverToggleDirective)`
Reference to the toggle element used to open/close the popover.

popoverPosition
Type : `string`
Current calculated position class of the popover.

### Accessors

cssClasses
get `cssClasses()`

popoverToggleAriaControls
get `popoverToggleAriaControls()`
Returns the value of the `aria-controls` attribute from the toggle element, if available. Used for accessibility linking. Returns : `string | null`

# results matching ""

# No results matching ""