angular - 如何显示 SearchFilter 文本框,即使 Angular Multiselect Dropdown 中没有加载数据
问题描述
角度版本:8
ng-multiselect-dropdown 版本:^0.2.10
就我而言,用户能够开始在搜索字段中输入以将结果动态加载到下拉列表中。但是在 ng-multiselect-dropdown 搜索框中要可见,至少需要一行数据。有没有办法始终显示搜索过滤器,无论数据是否可用。
this.dropdownList = [];
this.dropdownSettings= {
singleSelection: false,
idField: 'item_id',
textField: 'item_text',
selectAllText: 'Select All',
unSelectAllText: 'UnSelect All',
itemsShowLimit: 3,
allowSearchFilter: true
};
解决方案
我迟到了,但是如果有人再次遇到相同的问题,这可能会很有用。添加allowRemoteDataSearch:true
到您的下拉选项中。
你可以参考这个线程
https://github.com/NileshPatel17/ng-multiselect-dropdown/issues/182
推荐阅读
- sql - 如何重置程序oracle内部的序列
- python-3.x - Python点击库:找不到命令
- amazon-web-services - 如何在 AWS EC2 存储优化驱动器上写入文件?
- javascript - Sequelize 使用 include 时自动添加新模型
- linux - 我可以以不同于 root 的用户身份运行 cloud init 吗?
- flutter - 如何在颤振项目中使用 cocoapods
- node.js - 如何为没有恒定值的变量添加智能感知?
- reactjs - 反应原生模糊相机
- azure - Azure:VM 上的 Docker 容器在创建后在公共地址上随机超时?
- ruby-on-rails - AWS_CONTAINER_CREDENTIALS_RELATIVE_URI 不起作用