From what I understand mat table dataSource is a thin wrapper around an Observable and its interface looks a lot like the ConnectableObservable.
After a bit of digging I realised that rxjs/ConnectableObservable's connect method returns either a Disposable or a more likely a Subscription depending which source you trust. This doesn't quite match with the expected API from material.
The examples given on the material website do declare additional classes for some obscure reason however it feels like a regular ConnectableObservable should work just fine here.
Is there a way to make material table accept a ConnectableObservable as dataSource or is there a good reason why I should be extending the cdk/DataSource abstract class?
Here are two mildly related SO:
- How to use material2 data table
- How do I connect my md-table (cdk data-table) to a service to be used as the data source?
ps if you have a link to a working plunker/fiddle/whatever i'll be happy to provide an example
connect()
– Pace