【问题标题】:how add fix header to autocomplete popup in angular that cannot scroll?如何将修复标题添加到无法滚动的角度自动完成弹出窗口?
【发布时间】:2018-11-27 22:57:50
【问题描述】:

我想将标题修复为角度自动完成我该怎么做 here is image what i want

【问题讨论】:

  • 您能否指定您正在使用的组件库并提供更多详细信息,例如代码示例

标签: angular autocomplete


【解决方案1】:

为了创建这个 ui 将下面的 div 添加到输入框,在该 div 中添加 ngfor 循环,在文本更改过滤器数组上显示下面的数组到文本框 以下是实施思路 <div> <!-- parent div --> <div> <input type="text"> <!-- add event on change and on change filter the array show the array in below div --> </div <div *ngFor="let item of items"> <!-- this div must be below to input box --> <div>item</div><button>Add</button> <!-- on click event add your logic after adding change the text of button --> </div> </div>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-12-03
    • 2022-01-19
    • 2019-03-05
    • 1970-01-01
    • 2013-07-14
    • 2023-03-13
    • 2016-01-07
    • 1970-01-01
    相关资源
    最近更新 更多