【发布时间】:2019-05-30 04:50:15
【问题描述】:
ngbTypeahead 不提供滚动条。 我将此作为NgbTypeahead component doesn't scroll inside a scrollable component的推荐:
<div style="height: 300px; overflow-y: auto; position:relative">
<input type="text" name="origin" class="form-control form-control-sm" id="origin" [(ngModel)]="data.origin" [editable]="false" [ngbTypeahead]="searchOrigin"
[resultFormatter]="formatDropdown" [inputFormatter]="formatSelected" placeholder="Search..."/>
</div>
效果很好,只是在列表不显示(或没有焦点)时显示丑陋的空白区域
当带有滚动条的列表出现时,如何去除空白并覆盖在另一个元素上?
感谢您的帮助。
【问题讨论】:
-
我已经回答了这个问题。请关注:stackoverflow.com/a/63010957/13968446