Using RxJS
Angular Data Grid
The use of the RxJS library is the only 3rd party npm package any of our data grids use.
As you can see in the image above on line 31, the project you download if you choose us defaults to RxJS version ~7.8.0. This allows
our code to pass multiple callback arguments (we only pass 1) to the .subscribe method like
pictured below on line 175:
Depending on your existing project setup or the version of RxJS that you install, the .subscribe
method may expect different argument(s). There are 14 instances of the .subscribe method being used in the Angular Data Grid
code, and if your version of RxJS expects 1 object with callback functions as the next, error, complete properties, you will get
a compiler error. If that happens, simply change the code to follow the below api:
this.dataTableService.getSampleData().subscribe({
next: (val) => console.log('Received:', val),
error: (err) => console.error('Error occurred:', err),
complete: () => console.log('Done!')
});
Then simply pass the 1 callback function our default code uses as the function given to the next property.