javascript - 单击下拉项目时不要关闭下拉菜单
问题描述
这是我使用 bootstrap 4 的代码的 Fiddle 链接。当我单击下拉菜单时,Dropdown 将在我的本地环境中关闭。在小提琴中,它工作正常。我在当地错过了哪一点。甚至我的本地和小提琴设置都是一样的。
<div class="dropdown d-inline-block">
<button class="btn btn-info dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Advance Filter
</button>
<div class="dropdown-menu pr-2 pl-2 advance-filter-dropdown" aria-labelledby="dropdownMenuButton">
<div class="advance-filter-wrap">
<div class="row">
<div class="col-6">
<div class="form-group">
<label for="" class="sr-only">By Agent</label>
<select name="" id="" class="form-control">
<option value="agent1">Agent 1</option>
<option value="agent2">Agent 2</option>
<option value="agent3">Agent 3</option>
<option value="agent4">Agent 4</option>
</select>
</div>
</div>
<div class="col-6">
<div class="form-group">
<label for="" class="sr-only">Lead Potential</label>
<select name="" id="" class="form-control">
<option value="huge">Huge</option>
<option value="medium">Medium</option>
<option value="small">Small</option>
</select>
</div>
</div>
</div>
</div>
<div class="advance-filter-footer text-right">
<button class="btn btn-danger btn-sm">Reset All</button>
<button class="btn btn-success btn-sm">Apply</button>
</div>
</div>
</div>
解决方案
推荐阅读
- javascript - 如何使用 JS Fatch Api 发布 JSON 有效负载(名称、电子邮件)
- docker - Airflow Celery 执行器开始失败的任务
- python - dask 进程调度程序运行不佳
- reactjs - 如何在 nx 框架中开玩笑地忽略测试文件的执行
- docker - 如何构建和部署 pgadmin 到 OpenShift?
- vb.net - VB.net - 从共享文件夹中读取 .msg 文件并提取其中的附件
- javascript - 无法使用 v-for 获取动态添加的组件的 ID
- javascript - 获取 Angular 指令表标题行中的列索引
- keycloak - 从 keycloak jwt 令牌获取 ID(不是 clientId)
- typescript - 从规则中获取 »className«