Browse Source

Refactored rateLimitsArray sharing data

pull/6979/head
deaflynx 4 years ago
parent
commit
1242b808cf
  1. 2
      ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits-list.component.html
  2. 4
      ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits-list.component.ts

2
ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits-list.component.html

@ -61,6 +61,6 @@
</button> </button>
<div fxFlex fxLayoutGap="8px" fxLayout="column" class="tb-rate-limits-preview" [ngClass]="{'tb-rate-limits-preview-short': !disabled}"> <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> <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> </div>
</section> </section>

4
ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits-list.component.ts

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

Loading…
Cancel
Save