UNPKG

@zarlex/ngx-accessor

Version:

This library provides an adapter to interact with Angular forms. It also provides an adapter to work with object signals and forms

47 lines (46 loc) 2.16 kB
import { ElementRef, OnDestroy, Renderer2 } from '@angular/core'; import { SelectMultipleControlValueAccessor } from '@angular/forms'; import * as i0 from "@angular/core"; export declare class SelectMultipleControlValueAccessorDirective extends SelectMultipleControlValueAccessor { static ɵfac: i0.ɵɵFactoryDeclaration<SelectMultipleControlValueAccessorDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<SelectMultipleControlValueAccessorDirective, "select[multiple][ngxAccessor]", never, {}, {}, never, never, true, never>; } /** * Adapted code from Angular https://github.com/angular/angular/blob/main/packages/forms/src/directives/select_multiple_control_value_accessor.ts * This code defines SelectMultipleControlValueAccessorDirective as select * * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ export declare class SelectMultipleOption implements OnDestroy { private _element; private _renderer; private _select; id: string; /** @internal */ _value: any; constructor(_element: ElementRef, _renderer: Renderer2, _select: SelectMultipleControlValueAccessorDirective); /** * @description * Tracks the value bound to the option element. Unlike the value binding, * ngValue supports binding to objects. */ set ngValue(value: any); /** * @description * Tracks simple string values bound to the option element. * For objects, use the `ngValue` input binding. */ set value(value: any); /** @internal */ _setElementValue(value: string): void; /** @internal */ _setSelected(selected: boolean): void; /** @nodoc */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SelectMultipleOption, [null, null, { optional: true; host: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<SelectMultipleOption, "option", never, { "ngValue": { "alias": "ngValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, true, never>; }