Skip to content

Commit 8dc4b72

Browse files
authored
refactor: setting min dropdown width to be equal to trigger width (#524)
* refactor: setting min dropdown width to be equal to trigger width * refactor: fix lint
1 parent f080288 commit 8dc4b72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/components/src/multi-select/multi-select.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ import { SelectSize } from '../select/select-size';
3131
>
3232
<ht-popover [disabled]="this.disabled" class="multi-select-container">
3333
<ht-popover-trigger>
34-
<div class="trigger-content" [ngClass]="this.justifyClass">
34+
<div class="trigger-content" [ngClass]="this.justifyClass" #triggerContainer>
3535
<ht-icon *ngIf="this.icon" class="trigger-prefix-icon" [icon]="this.icon" size="${IconSize.Small}">
3636
</ht-icon>
3737
<ht-label class="trigger-label" [label]="this.triggerLabel"></ht-label>
3838
<ht-icon class="trigger-icon" icon="${IconType.ChevronDown}" size="${IconSize.Small}"></ht-icon>
3939
</div>
4040
</ht-popover-trigger>
4141
<ht-popover-content>
42-
<div class="multi-select-content">
42+
<div class="multi-select-content" [ngStyle]="{ 'min-width.px': triggerContainer.offsetWidth }">
4343
<ng-container *ngIf="this.showAllOptionControl">
4444
<div class="multi-select-option all-options" (click)="this.onAllSelectionChange()">
4545
<input class="checkbox" type="checkbox" [checked]="this.areAllOptionsSelected()" />

0 commit comments

Comments
 (0)