kendo-ui - 当我们在 IE 浏览器中单击打开它时,Kendo Dropdown 会关闭
问题描述
我在我的页面中使用 Kendo UI v2018.1.221,每当我单击下拉菜单打开它时,它只会打开并显示选项并在我做出选择之前突然关闭。它也使用服务器过滤。我用谷歌搜索了很多,但没有找到任何解决方案。示例代码:
<table>
<TR>
<TD ALIGN="left" >Company:</TD>
<TD ALIGN="left" >
<select class="form-control" style="width: 80%" name="teamID" id="company">
</select>
</TD>
</TR>
<script>
var dropdown = $("#company").kendoDropDownList({
dataTextField: "name",
dataValueField: "id",
filter: 'contains',
optionLabel: 'Select a Company',
enable: true,
scrollable: {
virtual: true
},
virtual: {
itemHeight: 26
},
dataSource: {
type: "odata",
transport: {
read: {
dataType: "json",
url: "#url#"
}
},
batch: true,
pageSize: 80,
serverPaging: true,
serverFiltering: true,
schema: {
data: "data",
total: 'recordsTotal',
model: {
id: 'teamid',
fields: {
id: {
type: 'number'
},
name: {
type: 'string'
}
}
}
}
}
}).data("kendoDropDownList");
</script>
解决方案
您需要将焦点从模态中移开。您可以在公开活动中执行此操作。
open: function(e) {
$(document).off('focusin.bs.modal');
}
推荐阅读
- python - 获取“字节”对象没有属性“编码”
- android - 添加评论时更新 RecyclerView
- python - 基于日期比较的Python数据框过滤
- visual-studio - 在 if 结构中定义时被视为未定义的变量
- flutter - Flutter 中的目标事件监听
- swift - SwiftUI 致命错误:未找到类型的 ObservableObject
- meteor - Meteor JS中的周围背景颜色
- feathersjs - 在羽毛 JS 中将文件发送到前端
- react-native - React-Native:所有选项卡上的抽屉导航器(react-navigation v5)
- reactjs - 获取必须渲染的错误文本组件