title: Angular Material mat-table is not showing updated data from data source
body: <p>My simple task is to add the text typed in an input box to the mat-table but it didn't work as expected. The datasource only refreshed one time and didn't show update data start from the second time.</p>
  
  <p><strong>Here is my code app.component.html</strong></p>
  
  <pre><code> &lt;div class="main" fxLayout="column" fxGap="10"&gt;
     &lt;div class="input-area"&gt;
       &lt;mat-form-field&gt;
          &lt;input matInput placeholder="Type something" [(ngModel)]="currentText"&gt; 
       &lt;/mat-form-field&gt;
       &lt;button mat-raised-button color="primary" style="margin-left:10px;" (click)="onAdd($event)"&gt;Add&lt;/button&gt;
     &lt;/div&gt;
     &lt;div class="result-area"&gt;
        &lt;mat-table #table [dataSource]="dataSource" class="mat-elevation-z8"&gt;
          &lt;ng-container matColumnDef="name"&gt;
           &lt;mat-header-cell #th *matHeaderCellDef&gt; Name &lt;/mat-header-cell&gt;
           &lt;mat-cell #td *matCellDef="let element"&gt; {{element.name}} &lt;/mat-cell&gt;
          &lt;/ng-container&gt;
          &lt;mat-header-row #tr *matHeaderRowDef="displayedColumns"&gt;&lt;/mat-header-row&gt;
          &lt;mat-row #tr *matRowDef="let row; columns: displayedColumns;"&gt;&lt;/mat-row&gt;
        &lt;/mat-table&gt;
     &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is my "app.component.ts" which contains "Add" event that updates the table datasource.</p>
  
  <pre><code>@Component({
    selector: 'my-app',
    templateUrl: './app.component.html',
    styleUrls: [ './app.component.css' ]
  })
  export class AppComponent  {
    currentText: string= "";
    displayedColumns = ['name'];
    data: Data[] = [];
    dataSource: Data[];
  
    constructor(){}
  
    onAdd($event){
     this.data.push({name: this.currentText});
     this.dataSource = this.data;
    }
  }
  
  interface Data{
    name: string;
  }
  </code></pre>
  
  <p>What did I do wrong? 
  Here is the stackblitz example of the above <a href="https://stackblitz.com/edit/angular-gcf95m" rel="noreferrer">code</a></p>