@pega/dx-component-builder-sdk
Version:
Utility for building custom UI components
36 lines (29 loc) • 1.06 kB
text/typescript
import { Component, OnInit, Input, forwardRef, OnChanges, SimpleChanges } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormGroup } from '@angular/forms';
import { ComponentMapperComponent } from '@pega/angular-sdk-components';
import { FormTemplateBase } from '@pega/angular-sdk-components';
({
selector: 'app-three-column',
templateUrl: './three-column.component.html',
styleUrls: ['./three-column.component.scss'],
standalone: true,
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
})
export class ThreeColumnComponent extends FormTemplateBase implements OnInit, OnChanges {
() override pConn$: typeof PConnect;
() formGroup$: FormGroup;
arChildren$: any[];
ngOnInit() {
this.updateSelf();
}
ngOnChanges(changes: SimpleChanges): void {
const { pConn$ } = changes;
if (pConn$.previousValue && pConn$.previousValue !== pConn$.currentValue) {
this.updateSelf();
}
}
updateSelf() {
this.arChildren$ = this.pConn$.getChildren();
}
}