Make Dropdown to Process List Scroll Properly
This commit is contained in:
1 parent
0baba36f7f
commit
5de6d111f2
4 files changed
+110
-24
No files matched your search
@@ -1,24 +1,30 @@
|
||||
<ng-template #inputTemplate>
|
||||
<div #searchInput class="dropdown-input" [class.hidden]="!isOpen()" [class.focus-mode]="inputFocusMode()"
|
||||
contenteditable="true" role="textbox" aria-multiline="false" [aria-placeholder]="translation.common.selectOption" [aria-activedescendant]="ariaActiveDescendant()"
|
||||
[attr.placeholder]="translation.common.selectOption" tabindex="-1" spellcheck="false"
|
||||
(input)="onSearch($event)" (click)="handleInputClick($event)" (mousedown)="handleInputMouseDown()" (beforeinput)="preprocessInputContent($event)"></div>
|
||||
</ng-template>
|
||||
|
||||
<div class="dropdown-box">
|
||||
@if (icon()) {
|
||||
<span class="material-symbols-outlined icon-24 prefix-icon">{{ icon() }}</span>
|
||||
}
|
||||
|
||||
@if (isOpen()) {
|
||||
<div #searchInput class="dropdown-input" [class.hidden]="!isOpen()" [class.focus-mode]="inputFocusMode()"
|
||||
contenteditable="true" role="textbox" aria-multiline="false" [aria-placeholder]="translation.common.selectOption"
|
||||
[attr.placeholder]="translation.common.selectOption" tabindex="-1" spellcheck="false"
|
||||
(input)="onSearch($event)" (click)="handleInputClick($event)" (mousedown)="handleInputMouseDown()" (beforeinput)="preprocessInputContent($event)">{{ this.initialInputText() }}</div>
|
||||
} @else {
|
||||
@if (recreateKey() % 2 == 0) {<ng-container [ngTemplateOutlet]="inputTemplate" />}
|
||||
@else {<ng-container [ngTemplateOutlet]="inputTemplate" />}
|
||||
|
||||
@if (!isOpen()) {
|
||||
<span class="placeholder">{{ selectedLabel() }}</span>
|
||||
}
|
||||
<span class="material-symbols-outlined icon-24 chevron" [class.open]="isOpen()">keyboard_arrow_down</span>
|
||||
</div>
|
||||
|
||||
@if (isOpen()) {
|
||||
<div class="dropdown-container">
|
||||
<ul class="dropdown-list" role="listbox" [id]="dropdownId + '-listbox'">
|
||||
<div class="dropdown-container" tabindex="-1">
|
||||
<ul class="dropdown-list" role="listbox" [id]="dropdownId + '-listbox'" tabindex="-1">
|
||||
@for (option of filteredOptions(); track option.value; let i = $index) {
|
||||
<li
|
||||
#optionItem
|
||||
class="dropdown-item"
|
||||
role="option"
|
||||
[id]="dropdownId + '-option-' + i"
|
||||
|
||||
Reference in new issue
Block a user