### File

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

### Extends

`ECLBaseDirective`

### Implements

`EclCategoryFilterItem`

### Metadata

selector | `ecl-category-filter-item`
imports | `NgTemplateOutlet` `EUI_ECL_ICON`
templateUrl | `./ecl-category-filter-item.component.html`

### Index

###### Properties
className eclCategoryList isCurrent isExpanded role
###### Methods
onItemClick getCssClasses
###### Inputs
href id class e2eAttr tabindex
###### Outputs
itemSelect
###### HostBindings
attr.role class.ecl-category-filter__list-item class.ecl-category-filter__list-item--open
###### Accessors
isAriaExpanded level levelClass hasChildren children isRootItemWithChildren isChildItemWithChildren isRootItem

### 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
get `isAriaExpanded()`
Indicates whether the item is expanded. Applied only if the item has children. Returns : `boolean`

level
get `level()`
Returns the hierarchical level of the item within the tree. Returns : `number`
set `level(value: number)`
Sets the level and updates the level of the child list accordingly. Parameters :
Name | Type | Optional
value | `number` | No
Returns : `void`

levelClass
get `levelClass()`
Returns the CSS class for the current level of the item. Returns : `string`

hasChildren
get `hasChildren()`
Indicates whether the item has child elements. Returns : `boolean`

children
get `children()`
Returns the child components of this item, if any. Returns : `EclCategoryFilterItemComponent[]`

isRootItemWithChildren
get `isRootItemWithChildren()`
Returns true if this is a root-level item and has children. Returns : `boolean`

isChildItemWithChildren
get `isChildItemWithChildren()`
Returns true if this is a child item and has its own children. Returns : `boolean`

isRootItem
get `isRootItem()`
Returns true if this is a root-level item (level === 1). Returns : `boolean`

# results matching ""

# No results matching ""