diff --git a/ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.scss b/ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.scss index 9a5b56c288..23cab6c913 100644 --- a/ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.scss +++ b/ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.scss @@ -1,9 +1,13 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 @import '../../../../../scss/constants'; :host { width: 100%; + max-height: 90vh; + display: flex; + flex-direction: column; .mat-toolbar { background: none; @@ -14,6 +18,8 @@ flex-direction: column; gap: 16px; padding-top: 4px; + overflow: auto; + flex: 1; } .tb-select-interval { diff --git a/ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.ts b/ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.ts index 93200f2041..456530d485 100644 --- a/ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.ts +++ b/ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.ts @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-License-Identifier: Apache-2.0 -import { Component, InjectionToken, OnDestroy, OnInit } from '@angular/core'; +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 +import { Component, ElementRef, InjectionToken, OnDestroy, OnInit } from '@angular/core'; import { OverlayRef } from '@angular/cdk/overlay'; import { TimeseriesDeleteStrategy, @@ -37,10 +38,14 @@ export class DeleteTimeseriesPanelComponent implements OnInit, OnDestroy { private destroy$ = new Subject(); + private resizeObserver = new ResizeObserver(() => this.overlayRef.updatePosition()); + constructor(private overlayRef: OverlayRef, + private elementRef: ElementRef, private fb: FormBuilder) { } ngOnInit(): void { + this.resizeObserver.observe(this.elementRef.nativeElement); const today = new Date(); this.deleteTimeseriesFormGroup = this.fb.group({ strategy: [TimeseriesDeleteStrategy.DELETE_ALL_DATA], @@ -72,6 +77,7 @@ export class DeleteTimeseriesPanelComponent implements OnInit, OnDestroy { } ngOnDestroy(): void { + this.resizeObserver.disconnect(); this.destroy$.next(); this.destroy$.complete(); }