title: Angular mat-table: How to refresh datasource with updated resource as response?
body: <p>I am using a <code>mat-table</code> to show a list of articles. I can change the price of different articles. After updating the price of the article I am getting back the updated article (updated resource). I want to refresh my datasource without having to call the getArticles and load all the articles because I have already the updated article. </p>
  
  <p>So I can update the datasource replacing the old for the updated item or which is the proper way to do that?</p>
  
  <pre><code>private updateArticle(value: any, id: string): void {
      this.dataService.patchArticle(id,price)
          .subscribe(
              article =&gt; {
                 this.dataService.getArticles(); //that is unnecessary, I have the updated article in variable 'article'
                 //this.replaceArticleDatasource(article) //update datasource
                .subscribe(
                    data =&gt; {
                      this.articles = data;
                      this.dataSource = new MatTableDataSource(this.articles);
                });
              }
            );
  }
  </code></pre>