Refactored rateLimitsArray sharing data

This commit is contained in:
deaflynx 2022-07-26 15:26:12 +03:00
parent b1f3ec03b1
commit 1242b808cf
2 changed files with 5 additions and 1 deletions

View File

@ -61,6 +61,6 @@
</button>
<div fxFlex fxLayoutGap="8px" fxLayout="column" class="tb-rate-limits-preview" [ngClass]="{'tb-rate-limits-preview-short': !disabled}">
<span translate>tenant-profile.rate-limits.preview</span>
<tb-rate-limits-text [rateLimitsArray]="rateLimitsControl.value"></tb-rate-limits-text>
<tb-rate-limits-text [rateLimitsArray]="rateLimitsArray"></tb-rate-limits-text>
</div>
</section>

View File

@ -95,6 +95,10 @@ export class RateLimitsListComponent implements ControlValueAccessor, Validator,
return this.rateLimitsListFormGroup.get('rateLimits') as FormArray;
}
get rateLimitsArray(): Array<RateLimits> {
return this.rateLimitsControl.value;
}
registerOnChange(fn: any): void {
this.propagateChange = fn;
}