title: Sorting, pagination and filter in mat-table with custom datasource?
body: <p>I'm trying to sort, paginate and filter table with Angular Material "mat-table" getting its data from custom datasource.</p>
  
  <p>I'm using angular 5.2.5 with chrome navigator</p>
  
  <p>This is the component...</p>
  
  <pre><code>constructor(
      private jobsService: JobsService,
      public dialog: MatDialog,
      private snackBar: MatSnackBar,
      private aps: ApplicationsService,
      private bindingsService: BindingsService
    ) {
      this.jobs = new Jobs(jobsService);
      this.jobsDataSource = new JobDataSource(this.jobs);
    }
  </code></pre>
  
  <p>This is my own datasource (JobDataSource)</p>
  
  <pre><code>import { DataSource } from '@angular/cdk/table';
  import { Jobs } from './jobs';
  import { Observable } from 'rxjs/Observable';
  import { Job } from './job.model';
  import { SatelliteResponse } from './satelliteresponse.model';
  
  export class JobDataSource extends DataSource&lt;SatelliteResponse&gt; {
  
      constructor(private jobs: Jobs) {
          super();
      }
  
      /** Connect function called by the table to retrieve one stream containing the data to render. */
      connect(): Observable&lt;SatelliteResponse[]&gt; {
          const displayDataChanges = [
              this.jobs.dataChange,
              this.jobs.jobList
          ];
  
          return Observable.merge(...displayDataChanges).map((data) =&gt; {
              return data;
          });
      }
  
      disconnect() { }
  
  }
  </code></pre>
  
  <p>The thing I need is like the example...</p>
  
  <pre><code>dataSource = new MatTableDataSource&lt;PeriodicElement&gt;(ELEMENT_DATA);
  </code></pre>
  
  <p>so... I think I need my JobDataSource class extends MatTableDataSource (because  MatTableDataSource is a child of DataSource). I change the code, but it shows me an error saying "connect" is not a method for MatTableDataSource.</p>
  
  <p>How can I achieve it? How can I modify JobDataSource to still getting data with an observable and also get MatTableDataSource properties for filtering, sorting... etc.</p>
  
  <p>Thank you</p>