ngx-datatables给出“rxjs_1.fromEvent不是函数”。排序时出错 [英] ngx-datatables gives "rxjs_1.fromEvent is not a function" error while sorting

查看:93
本文介绍了ngx-datatables给出“rxjs_1.fromEvent不是函数”。排序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是按照演示来展示一个简单的数据表。这是我的代码:

I'm just following the demo to show a simple datatable. Here is my code:

columns = [
    {name: 'ID', prop: 'id'},
    {name: 'Street Address', prop: 'address.street'},
    {name: 'Suburb', prop: 'address.suburb'},
    {name: 'State', prop: 'address.state'},
    {name: 'Manager Name', prop: 'manager.name'},
    {name: 'Manager Company', prop: 'manager.company'},
  ];

<ngx-datatable #table
  class = 'material striped'
  [columns] = "columns"
  [rows] = "rows | async"
  [footerHeight] = "25" >
</ngx-datatable>

排序确实有效,但是我也遇到了这个错误我点击一列来对记录进行排序:

Sorting does work but, I'm also getting this error when I click on a column to sort the records:

我从Firestore获取Observable行。

I get rows as Observable from Firestore.

推荐答案

ngx-datatable rxjs 不兼容。

如果您使用 ngx-datatable@^12.0。 0 ,那么你需要 rxjs@^6.0.0

If you're using ngx-datatable@^12.0.0, then you need rxjs@^6.0.0.

如果你能不升级 rxjs (因为,例如,你仍然需要使用Angular的v5),那么你可以使用 ngx-datatable@11.3.2 适用于 rxjs@^5.0.0

If you can't upgrade rxjs (because, for example, you still need to use v5 of Angular), then you can use ngx-datatable@11.3.2 which works with rxjs@^5.0.0.

这篇关于ngx-datatables给出“rxjs_1.fromEvent不是函数”。排序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆