Skip to content
@ng-doc/ui-kit / Class

NgDocOptionComponent

Option of a list. Clicking it, or pressing Enter while it is active, checks it in its host control; an option that contains a link follows the link instead.

Decorators
@Component
Selectors
ng-doc-option
Generic types
T
Extends
DIStateControl<T>
Implements
NgDocListItemOnDestroy
DeclarationTypeScript
@Component({ … })
export class NgDocOptionComponent<T>
  extends DIStateControl<T>
  implements NgDocListItem, OnDestroy { … }

Members

Constructor

1
()
—

Properties

14
change: (value: T | null) => void
protected inherited from DIControlValueAccessor
—
changeDetectorRef: ChangeDetectorRef
protectedreadonly inherited from DIControlValueAccessor
—
checked: Signal<boolean | null>
inherited from DIStateControl
—
config?: DIStateControlConfig<boolean | TModel> | undefined
protectedreadonly inherited from DIStateControl
—
disabledValue: WritableSignal<boolean>
protectedreadonly inherited from DIControlValueAccessor
—
elementRef: ElementRef<HTMLElement>
readonly overrides DIControlValueAccessor
—
hovered: WritableSignal<boolean>
protectedreadonly

Whether the option is the active item of the list's keyboard navigation.

incomingUpdate?: ((value: T | null) => void) | undefined
protectedreadonly inherited from DIControlValueAccessor
—
list: NgDocListComponent | null
protectedreadonly
—
model: Signal<T | null>
protectedreadonly inherited from DIControlValueAccessor
—
ngControl: NgControl | null
protectedreadonly inherited from DIControlValueAccessor
—
renderer: Renderer2
protectedreadonly inherited from DIControlValueAccessor
—
touch: () => void
protected inherited from DIControl

Function that should be used to make control touched.

value: true | TModel
inherited from DIStateControl
—

Accessors

4
get disabled: boolean
inherited from DIControlValueAccessor

Returns true if the control is disabled.

set disabled: boolean
inherited from DIControlValueAccessor
—
get hasValue: boolean
inherited from DIControlValueAccessor

Returns true if the control is not empty.

get isIntermediate: boolean
inherited from DIStateControl
—

Methods

13
(): void
inherited from DIStateControl

Sets checked state

(): void
inherited from DIStateControl

Sets intermediate state

(…): void
inherited from DIStateControl
—
(): void
implements OnDestroy
—
(): void
inherited from DIControl
—
(…): void
inherited from DIControl

Method is called by the forms API.

(): void

Selects the option as if the user did: follows its link, or checks it.

(): void
implements Highlightable

Marks the option as the active item.

(): void
implements Highlightable

Clears the active-item mark.

(): void
inherited from DIStateControl

Toggles checked state

(): void
inherited from DIStateControl

Sets unchecked state

(…): void
inherited from DIControl

Updates the model of the current control. This is the main method that should be used to update the model.

(…): void
inherited from DIControl

Method is called by the forms API to write to the view when programmatic changes from model to view are requested.

Symbol
Kind
Class
Decorators
@Component
Selectors
ng-doc-option
Generic types
T
Extends
DIStateControl<T>
Implements
NgDocListItemOnDestroy
Scope
@ng-doc/ui-kit
Edit this page