aurelia - Aurelia Kendo Grid - 搜索栏不显示
问题描述
使用 Aurelia 和 Kendo UI,如何显示搜索栏?
我要这个:
但我得到了这个:
我想显示搜索栏,但我得到了一个“搜索”按钮。
剑道文档:https ://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/search.fields
我的例子:https ://gist.run?id=ede27170780f6d9116808aab52cf5b68
应用程序.html
<template>
<require from="aurelia-kendoui-bridge/grid/grid"></require>
<require from="aurelia-kendoui-bridge/grid/col"></require>
<ak-grid k-data-source.bind="datasource"
k-toolbar.bind="['search']">
<ak-col k-title="name" k-field="name"></ak-col>
<ak-col k-title="age" k-field="age"></ak-col>
</ak-grid>
</template>
应用程序.js
export class App {
constructor() {
this.datasource = {
data: [
{ name: "Jane", age: 30 },
{ name: "John", age: 33 }
],
schema: {
model: {
fields: {
name: { },
age: { type: "number" }
}
}
}
};
}
}
解决方案
推荐阅读
- python - Kivy 矩形源没有更新?
- javascript - 如何以“类似时钟”的方式添加数字?
- linux - E: 无法在 Ubuntu 16.04 上找到包 ros-kinetic-desktop-full
- python-3.x - 熊猫如何获得点击值
- r - 使用 xlsx 包从 R 中导出的文件名中删除空格
- jquery - 如何使用 Jquery contextMenu X2 更新 contextMenu
- javascript - 用 Jest 模拟 Typescript 中导入函数的返回值
- javascript - onDoubleClick() 不适用于手机反应 js 应用程序
- php - 未定义的偏移量:php 中的 1
- asp.net-core - 生成 CrypoAPI (CAPI) 私钥