UNPKG

@rxap/material-form-system

Version:

Provides directives and a module to enhance Angular Material forms. It includes features such as displaying control errors, clearing input fields, handling required fields, and managing form field visibility based on defined conditions. The package also o

243 lines (126 loc) 6.75 kB
[**@rxap/material-form-system v19.0.4**](../README.md) *** [@rxap/material-form-system](../globals.md) / FormFieldHideShowDirective # Class: FormFieldHideShowDirective Defined in: [packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts:97](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts#L97) ## Extends - [`ExtractHideShowMixin`](ExtractHideShowMixin.md).`ExtractFormDefinitionMixin`.`OnInit`.`OnDestroy` ## Implements - `AfterContentInit` - `OnDestroy` ## Constructors ### new FormFieldHideShowDirective() > **new FormFieldHideShowDirective**(`formField`, `renderer`, `elementRef`): [`FormFieldHideShowDirective`](FormFieldHideShowDirective.md) Defined in: [packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts:115](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts#L115) #### Parameters ##### formField `MatFormField` ##### renderer `Renderer2` ##### elementRef `ElementRef` #### Returns [`FormFieldHideShowDirective`](FormFieldHideShowDirective.md) #### Inherited from [`ExtractHideShowMixin`](ExtractHideShowMixin.md).[`constructor`](ExtractHideShowMixin.md#constructors) ## Properties ### control > **control**: `RxapFormControl` Defined in: [packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts:112](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts#L112) #### Inherited from [`ExtractHideShowMixin`](ExtractHideShowMixin.md).[`control`](ExtractHideShowMixin.md#control) *** ### controlId > **controlId**: `string` Defined in: [packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts:110](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts#L110) #### Inherited from [`ExtractHideShowMixin`](ExtractHideShowMixin.md).[`controlId`](ExtractHideShowMixin.md#controlid) *** ### formDefinition > **formDefinition**: `FormDefinition` Defined in: [packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts:111](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts#L111) #### Inherited from [`ExtractHideShowMixin`](ExtractHideShowMixin.md).[`formDefinition`](ExtractHideShowMixin.md#formdefinition) ## Methods ### extractFormDefinition() > `protected` **extractFormDefinition**(`control`): `FormDefinition` Defined in: [packages/angular/form-system/src/lib/mixins/extract-form-definition.mixin.ts:10](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/form-system/src/lib/mixins/extract-form-definition.mixin.ts#L10) #### Parameters ##### control `AbstractControl` #### Returns `FormDefinition` #### Inherited from `ExtractFormDefinitionMixin.extractFormDefinition` *** ### extractHideFunction() > **extractHideFunction**(`formDefinition`, `controlId`): `null` \| `ControlHideShowFunction` Defined in: [packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts:61](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts#L61) #### Parameters ##### formDefinition `FormDefinition` = `...` ##### controlId `string` = `...` #### Returns `null` \| `ControlHideShowFunction` #### Inherited from [`ExtractHideShowMixin`](ExtractHideShowMixin.md).[`extractHideFunction`](ExtractHideShowMixin.md#extracthidefunction) *** ### extractOptions() > **extractOptions**(`formDefinition`, `controlId`): `ControlHideShowOptions` Defined in: [packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts:44](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts#L44) #### Parameters ##### formDefinition `FormDefinition` = `...` ##### controlId `string` = `...` #### Returns `ControlHideShowOptions` #### Inherited from [`ExtractHideShowMixin`](ExtractHideShowMixin.md).[`extractOptions`](ExtractHideShowMixin.md#extractoptions) *** ### extractShowFunction() > **extractShowFunction**(`formDefinition`, `controlId`): `null` \| `ControlHideShowFunction` Defined in: [packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts:78](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts#L78) #### Parameters ##### formDefinition `FormDefinition` = `...` ##### controlId `string` = `...` #### Returns `null` \| `ControlHideShowFunction` #### Inherited from [`ExtractHideShowMixin`](ExtractHideShowMixin.md).[`extractShowFunction`](ExtractHideShowMixin.md#extractshowfunction) *** ### ngAfterContentInit() > **ngAfterContentInit**(): `void` Defined in: [packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts:125](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts#L125) A callback method that is invoked immediately after Angular has completed initialization of all of the directive's content. It is invoked only once when the directive is instantiated. #### Returns `void` *** ### ngOnDestroy() > **ngOnDestroy**(): `void` Defined in: [packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts:210](https://gitlab.com/rxap/packages/-/blob/3eebed1be2bbb37bc0d65959f8fecbb850c0b8aa/packages/angular/material/form-system/src/lib/form-field-hide-show.directive.ts#L210) A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed. #### Returns `void` #### Inherited from `OnDestroy.ngOnDestroy` *** ### ngOnInit() > **ngOnInit**(): `void` Defined in: node\_modules/@angular/core/index.d.ts:8345 A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated. #### Returns `void` #### Inherited from `OnInit.ngOnInit`