mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
@@ -11,6 +11,7 @@
|
||||
cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop"
|
||||
[cdkConnectedOverlayMinWidth]="overlayMinWidth"
|
||||
[cdkConnectedOverlayLockPosition]="true"
|
||||
[cdkConnectedOverlayScrollStrategy]="blockScrollStrategy"
|
||||
(backdropClick)="close()"
|
||||
(detach)="isOpen.set(false)"
|
||||
>
|
||||
|
||||
@@ -17,7 +17,11 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
||||
import { NgIconComponent, provideIcons } from '@ng-icons/core';
|
||||
import { isaActionChevronUp, isaActionChevronDown } from '@isa/icons';
|
||||
import { ActiveDescendantKeyManager, Highlightable } from '@angular/cdk/a11y';
|
||||
import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
||||
import {
|
||||
CdkConnectedOverlay,
|
||||
CdkOverlayOrigin,
|
||||
ScrollStrategyOptions,
|
||||
} from '@angular/cdk/overlay';
|
||||
import { isEqual } from 'lodash';
|
||||
import { DropdownAppearance } from './dropdown.types';
|
||||
import { DropdownService } from './dropdown.service';
|
||||
@@ -119,6 +123,7 @@ export class DropdownButtonComponent<T>
|
||||
implements ControlValueAccessor, AfterViewInit
|
||||
{
|
||||
#dropdownService = inject(DropdownService);
|
||||
#scrollStrategy = inject(ScrollStrategyOptions);
|
||||
|
||||
readonly init = signal(false);
|
||||
private elementRef = inject(ElementRef);
|
||||
@@ -127,6 +132,10 @@ export class DropdownButtonComponent<T>
|
||||
return this.elementRef.nativeElement.offsetWidth;
|
||||
}
|
||||
|
||||
get blockScrollStrategy() {
|
||||
return this.#scrollStrategy.block();
|
||||
}
|
||||
|
||||
appearance = input<DropdownAppearance>(DropdownAppearance.AccentOutline);
|
||||
|
||||
appearanceClass = computed(() => `ui-dropdown__${this.appearance()}`);
|
||||
|
||||
Reference in New Issue
Block a user