Skip to content

ListItemDirective

directive

Directive for list items. It is used in the yuvList component to keep track of active and selected items. Every element with this directive will be treated as a list item and can be selected and focused.

Example :

<yuv-list (itemSelect)="itemSelected($event)">
<div yuvListItem>Entry #1</div>
<div yuvListItem>Entry #2</div>
</yuv-list>

Selector: [yuvListItem]

Standalone: Yes

Implements: Highlightable, AfterViewInit

Type: boolean | undefined

Type: boolean

Default Value: false

Whether the item is active or not.

Type: boolean

Default Value: false

Whether the item is selected or not.

Type: unknown

Default Value: linkedSignal(\{ source: this.active, computation: (newOptions: any, previous: any) => (newOptions !== previous ? newOptions : previous) \})

Type: Element[]

Default Value: []

Type: unknown

Default Value: -1

Type: function

Type: unknown

Default Value: linkedSignal(\{ source: this.selected, computation: (newOptions: any, previous: any) => (newOptions !== previous ? newOptions : previous) \})

focusNext(): void
focusPrevious(): void
onHostClick(evt: MouseEvent): void
NameTypeDescription
evtMouseEvent
setActiveStyles(): void
setInactiveStyles(): void