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

NgDocClearControlComponent

Button that clears the value of its host control and of the input of the surrounding input host. It is shown only while there is a value to clear.

Decorators
@Component
Selectors
ng-doc-clear-control
Generic types
T
Extends
DIControl<T, T>
Implements
AfterContentInit
DeclarationTypeScript
@Component({ … })
export class NgDocClearControlComponent<T>
  extends DIControl<T>
  implements AfterContentInit { … }

Members

Constructor

1
()
—

Properties

11
change: (value: T | null) => void
protected inherited from DIControlValueAccessor
—
changeDetectorRef: ChangeDetectorRef
protectedreadonly inherited from DIControlValueAccessor
—
config?: DIControlConfig<TModel, TChildModel> | undefined
protectedreadonly inherited from DIControl
—
disabledValue: WritableSignal<boolean>
protectedreadonly inherited from DIControlValueAccessor
—
elementRef: ElementRef<HTMLElement>
protectedreadonly inherited from DIControlValueAccessor
—
incomingUpdate?: ((value: T | null) => void) | undefined
protectedreadonly inherited from DIControlValueAccessor
—
inputHost: NgDocInputHost<T> | 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.

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 isVisible: boolean

Whether there is a value to clear.

Methods

6
(): void

Clears the value.

(): void
implements AfterContentInit
—
(): void
inherited from DIControl
—
(…): void
inherited from DIControl

Method is called by the forms API.

(…): 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-clear-control
Generic types
T
Extends
DIControl<T, T>
Implements
AfterContentInit
Scope
@ng-doc/ui-kit
Edit this page