使用Aurelia和Kendo UI,如何显示搜索栏?
我想要这个:
但是我明白了:
我想显示搜索栏,但出现一个“搜索”按钮。
Kendo文档:https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/search.fields
我的示例:https://gist.run?id=ede27170780f6d9116808aab52cf5b68
app.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>
app.js
export class App {
constructor() {
this.datasource = {
data: [
{ name: "Jane", age: 30 },
{ name: "John", age: 33 }
],
schema: {
model: {
fields: {
name: { },
age: { type: "number" }
}
}
}
};
}
}