title: Angular Material 2: How to refresh md-table after editing a record?
body: <p>So I have a user-list component and a user-detail component.</p>
  
  <p>The user-list component has an md-table listing all users registered. The user is able to click on a button to see the details of the corresponding entity.</p>
  
  <p>After editing the Name property and saving (for example), the user-detail redirects to the user-list component. But the md-table displays the old information.</p>
  
  <p>How can I trigger an md-table refresh after editing the entity in another component like this scenario?</p>
  
  <p>Here is my user-list component:</p>
  
  <pre><code>export class UserListComponent implements OnInit {
  tableDisplayedColumns: string[] = ['userName', 'email', 'options'];
  userDataSource: UserDataSource;
  
  constructor(private _userService: UserService, private _router: Router) { }
  
  ngOnInit(): void {
      this.userDataSource = new UserDataSource(this._userService);
  }}
  
  
  
  class UserDataSource extends DataSource&lt;UserVModel&gt; {
  constructor(private _userService: UserService) { 
      super();
  }
  
  connect(): Observable&lt;UserVModel[]&gt; {
      return this._userService.getAllUsers();
  }
  
  disconnect(): void { }}
  </code></pre>