File

packages/ecl/components/ecl-menu/ecl-menu-mega/ecl-menu-mega-item.component.ts

Description

This component represents a sub-menu item, that is on the second level of the ecl-menu. Adds some custom styling and functionality.

Extends

ECLBaseDirective

Implements

EclMenuItem AfterViewInit

Metadata

Index

Properties
Methods
Inputs
Outputs
HostBindings
HostListeners
Accessors

Inputs

href
Type : string
Default value : ''
id
Type : string
isCurrent
Type : boolean
Default value : false
isSeeAll
Type : boolean
Default value : false

An additional item, that represents a link.

label
Type : string
linkExtraAttributes
Type : literal type
queryParams
Type : Params | null
Default value : null
queryParamsHandling
Type : QueryParamsHandling
Default value : null
routerLink
Type : string | any[]
Default value : null
target
Type : string
Default value : ''
class
Type : string
e2eAttr
Type : any
tabindex
Type : number

Outputs

menuItemKeydown
Type : EventEmitter
menuItemSelect
Type : EventEmitter

HostBindings

attr.role
Type : string
Default value : 'listitem'

The default role of the DOM element is 'listitem', should not be changed.

class.ecl-menu__subitem
Type : boolean
Default value : true

HostListeners

click
Arguments : '$event'
click(evt: MouseEvent)

Methods

onFocus
onFocus()

Focus should be set on the underlying element.

onHostClick
onHostClick(evt: MouseEvent)
Decorators :
@HostListener('click', ['$event'])
Parameters :
Name Type Optional
evt MouseEvent No
Returns : void
onItemClick
onItemClick(evt: Event)
Parameters :
Name Type Optional Description
evt Event No

This event is emited, when the menu item is clicked.

Returns : void
onKeydown
onKeydown(evt: Event)
Parameters :
Name Type Optional
evt Event No
Returns : void
getCssClasses
getCssClasses(rootClass: string)
Parameters :
Name Type Optional
rootClass string No
Returns : string

Properties

children
Type : Array<EclMenuItem>
Default value : []
cmpClass
Type : unknown
Default value : true
Decorators :
@HostBinding('class.ecl-menu__subitem')
hasChildren
Type : unknown
Default value : false
iconComponents
Type : QueryList<EclIconComponent>
Decorators :
@ContentChildren(undefined)

If menu item includes any icon, added by the user (for example for 'external' link).

isExpanded
Type : unknown
Default value : true
links
Type : QueryList<EclLinkDirective>
Decorators :
@ContentChildren(undefined)

If menu item includes any links, added by the user.

megaMenuLink
Type : ElementRef
Decorators :
@ViewChild('megaMenuLink')

The actual link of the menu item.

role
Type : string
Default value : 'listitem'
Decorators :
@HostBinding('attr.role')

The default role of the DOM element is 'listitem', should not be changed.

Accessors

ariaCurrent
getariaCurrent()

When the item is the current active item, the 'aria-current' attribute is set to 'page'.

Returns : string | null

results matching ""

    No results matching ""