0
使用來自Kendo的官方網格過濾示例Plunker link,如果我爲產品ID字段啓用過濾器,那麼過濾器不起作用,並在控制檯中看到以下錯誤。基本上,編號欄過濾器都沒有工作。但是,如果數據類型是字符串,它的工作。Kendo Grid(Angular 2+)無法過濾編號列
ERROR:
ERROR TypeError: (d.ProductID || "").toLowerCase is not a function
at eval (eval at t.compileFilter (VM1859 kendo-data-query.js:NaN), <anonymous>:3:29)
at Object.t.count (VM1859 kendo-data-query.js:1)
at Object.t.process (VM1859 kendo-data-query.js:1)
at AppComponent.dataStateChange (VM1970 app.component.ts!transpiled:22)
at Object.eval [as handleEvent] (VM1971 AppComponent.ngfactory.js:23)
at handleEvent (VM856 core.umd.js:12108)
at callWithDebugContext (VM856 core.umd.js:13567)
at Object.debugHandleEvent [as handleEvent] (VM856 core.umd.js:13155)
at dispatchEvent (VM856 core.umd.js:8720)
at eval (VM856 core.umd.js:10882)
目前我通過將數據類型轉換爲字符串來做了一個解決方法。但是這個bug需要由Kendo團隊解決。 – ZabedAkbar