@pega/dx-component-builder-sdk
Version:
Utility for building custom UI components
35 lines (28 loc) • 979 B
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';
({
selector: 'app-two-column-tab',
templateUrl: './two-column-tab.component.html',
styleUrls: ['./two-column-tab.component.scss'],
standalone: true,
imports: [CommonModule, forwardRef(() => ComponentMapperComponent)]
})
export class TwoColumnTabComponent implements OnInit, OnChanges {
() pConn$: typeof PConnect;
() formGroup$: FormGroup;
arChildren$: any[];
ngOnInit(): void {
this.updateSelf();
}
ngOnChanges(changes: SimpleChanges): void {
const { pConn$ } = changes;
if (pConn$.previousValue && pConn$.previousValue !== pConn$.currentValue) {
this.updateSelf();
}
}
updateSelf() {
this.arChildren$ = this.pConn$.getChildren();
}
}