kendo-ui - 在 Kendo for Angular 中更改下拉弹出高度
问题描述
在这个StackBliz 中,我有一个 Kendo for Angular 下拉列表。当您打开下拉菜单时,弹出窗口会显示七个项目。我只想展示三个项目。所以我将高度设置popupSettings
为 30,但剑道忽略了它。如何更改弹出高度?
@Component({
selector: 'my-app',
template: `
<kendo-dropdownlist
[data]="listItems"
[popupSettings]="{
width: 100,
height: 30 }">
</kendo-dropdownlist>
`
})
export class AppComponent {
public listItems: Array<string> = [];
ngOnInit(){
for(var i=1;i<=100;i++)
this.listItems.push('Item ' + i);
}
}
解决方案
div
如果您可以检查浏览器上的元素,您将看到 Kendo 为下拉菜单生成一个。
<div unselectable="on" class="k-list-scroller" style="max-height: 200px;">
更改max-height
for 类k-list-scroller
推荐阅读
- azure - 添加多个 QnA 对
- go - TLS 相互身份验证返回错误,因为主机和端口的组合需要 TLS
- oauth-2.0 - IdentityServer - 用户 API 访问
- excel - 将 .txt 文件转换为 .xlsx
- php - vue组件html elemnet渲染
- android - AlertDialog 中的“确定”按钮应使用哪种类型的按钮?
- javascript - 带有 React 的 Google 地图 - “缺少所需的道具 loadingElement 或 googleMapURL。您需要同时提供它们”
- c - 列出当前运行进程的符号
- python - 如何从 csv 文件中创建一个以元组为值的字典?
- javascript - 外部 js 文件未检测到通过 ajax 调用添加的 html 表行