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:
I get rows as Observable from Firestore.
The version of ngx-datatable
and rxjs
that you're using are incompatible.
If you're using ngx-datatable@^12.0.0
, then you need rxjs@^6.0.0
.
If you can't upgrade rxjs
(because, for example, you still need to use v5 of Angular), then you can use [email protected]
which works with rxjs@^5.0.0
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With