protocol-lwm2m/components/configuration/typed-forms/form-wrapper-base.component.ts
OnInit
OnDestroy
selector | c8y-lwm2m-form-wrapper-base |
standalone | true |
imports |
CoreModule
Lwm2mUIThemeModule
|
templateUrl | ./form-wrapper-base.component.html |
Properties |
Methods |
|
constructor(service: Lwm2mConfigurationService<T>)
|
||||||
Parameters :
|
Abstract createForm |
createForm()
|
Returns :
FormlyFieldConfig[]
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
save |
save()
|
Returns :
void
|
buttons |
Type : object
|
Default value : {}
|
cancel |
Default value : () => {...}
|
Protected destroy$ |
Type : Subject<void>
|
Default value : new Subject()
|
Protected Abstract endpoint |
Type : LWM2MEndpoint
|
fields |
Type : FormlyFieldConfig[]
|
Default value : []
|
form |
Default value : new FormGroup({})
|
model |
Default value : {} as T
|
options |
Type : FormlyFormOptions
|
Default value : {
formState: { disabled: false }
}
|
<formly-form
*ngIf="fields?.length > 0; else empty"
[model]="model"
[form]="form"
[fields]="fields"
[options]="options"
data-cy="lwm2m-device-configuration--formly-form"
></formly-form>
<ng-template #empty>
<c8y-ui-empty-state
[icon]="'c8y-device-protocols'"
title="{{ 'No configuration selected' | translate }}"
subtitle="{{ 'Select a configuration on the left' | translate }}"
></c8y-ui-empty-state>
</ng-template>