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

AfterContentInit OnDestroy

Metadata

Index

Properties
Methods
Inputs
HostBindings
HostListeners
Accessors

Constructor

constructor(el: ElementRef, renderer: Renderer2)
Parameters :
Name Type Optional
el ElementRef No
renderer Renderer2 No

Inputs

class
Type : string
e2eAttr
Type : any
tabindex
Type : number

HostBindings

class
Type : string

HostListeners

document:keydown.escape
Arguments : '$event'
document:keydown.escape(event: KeyboardEvent)

Closes the popover when the Escape key is pressed.

document:scroll
Arguments : '$event'
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.

window:resize
Arguments : '$event'
window:resize()

Recalculates popover position when the window is resized.

Methods

onClickOutsidePopover
onClickOutsidePopover()
Decorators :
@HostListener('eclClickOutside')

Handler triggered when a click outside the popover is detected. Closes the popover if it is open.

Returns : void
onClose
onClose()

Public method used to close the popover and reset related styles.

Returns : void
onDocumentScroll
onDocumentScroll()
Decorators :
@HostListener('document:scroll', ['$event'])

Recalculates popover position when the document is scrolled.

Returns : void
onEscapeKeydownHandler
onEscapeKeydownHandler(event: KeyboardEvent)
Decorators :
@HostListener('document:keydown.escape', ['$event'])

Closes the popover when the Escape key is pressed.

Parameters :
Name Type Optional
event KeyboardEvent No
Returns : void
onWindowResize
onWindowResize()
Decorators :
@HostListener('window:resize', ['$event'])

Recalculates popover position when the window is resized.

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.

isHidden
Default value : true

Controls visibility of the popover. true means hidden.

popoverPosition
Type : string

Current calculated position class of the popover.

Accessors

cssClasses
getcssClasses()
popoverToggleAriaControls
getpopoverToggleAriaControls()

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 ""