File

packages/ecl/components/ecl-category-filter/ecl-category-filter-list/ecl-category-filter-item.component.ts

Extends

ECLBaseDirective

Implements

EclCategoryFilterItem

Metadata

Index

Properties
Methods
Inputs
Outputs
HostBindings
Accessors

Inputs

href
Type : string

Link URL associated with this category filter item. If not provided, the item acts as a toggle only.

id
Type : string

Unique identifier for the item. Used to manage selection state.

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

Outputs

itemSelect
Type : EventEmitter

Emits when the item is selected by the user (clicked).

HostBindings

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

Defines the ARIA role for the list item. Always set to "listitem".

class.ecl-category-filter__list-item
Type : boolean
Default value : true

Static class binding for base list item styling.

class.ecl-category-filter__list-item--open
Type : boolean

Indicates whether the item is expanded. Applied only if the item has children.

Methods

onItemClick
onItemClick(evt: MouseEvent)

Handles user click interaction, updates state and emits selection event. Prevents navigation if no href is defined.

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

Properties

className
Type : unknown
Default value : true
Decorators :
@HostBinding('class.ecl-category-filter__list-item')

Static class binding for base list item styling.

eclCategoryList
Type : EclCategoryFilterListComponent
Decorators :
@ContentChild(undefined)

Child list component if the item has nested children.

isCurrent
Type : unknown
Default value : false

Indicates whether the item is currently selected.

isExpanded
Type : unknown
Default value : false

Indicates whether the item is currently expanded (open).

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

Defines the ARIA role for the list item. Always set to "listitem".

Accessors

isAriaExpanded
getisAriaExpanded()

Indicates whether the item is expanded. Applied only if the item has children.

Returns : boolean
level
getlevel()

Returns the hierarchical level of the item within the tree.

Returns : number
setlevel(value: number)

Sets the level and updates the level of the child list accordingly.

Parameters :
Name Type Optional
value number No
Returns : void
levelClass
getlevelClass()

Returns the CSS class for the current level of the item.

Returns : string
hasChildren
gethasChildren()

Indicates whether the item has child elements.

Returns : boolean
children
getchildren()

Returns the child components of this item, if any.

isRootItemWithChildren
getisRootItemWithChildren()

Returns true if this is a root-level item and has children.

Returns : boolean
isChildItemWithChildren
getisChildItemWithChildren()

Returns true if this is a child item and has its own children.

Returns : boolean
isRootItem
getisRootItem()

Returns true if this is a root-level item (level === 1).

Returns : boolean

results matching ""

    No results matching ""