title: Default sorting in Angular Material with nested objects
body: <p>Im using mat table with sorting, where I want to set default sorting on a certain column.</p>
  
  <p>This works for plain attributes but not for nested ones.</p>
  
  <p>Here is my table</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;table mat-table [dataSource]="dataSource" multiTemplateDataRows 
         matSort matSortActive="break" matSortDirection="asc"
         class="mat-elevation-z4 w-100"&gt;
  </code></pre>
  
  <p>My nested sorting</p>
  
  <pre class="lang-js prettyprint-override"><code>this.dataSource.sort = this.sort;
     this.dataSource.sortingDataAccessor = (item, property) =&gt; {
     switch(property) {
        case 'break': return item.break.start;
        default: return item[property];
     }
  };
  </code></pre>
  
  <p>Also this nested sorting is fine, when you are manually clicking on the header to sort, it does what I expect but on default it doesn't sort, only shows the sorting arrow.</p>
  
  <p>That's how it looks like on page load:</p>
  
  <p><img src="https://i.stack.imgur.com/1YdlW.png" alt=""></p>
  
  <p>Here is the corresponding <a href="https://stackblitz.com/edit/angular-qpejgh" rel="nofollow noreferrer">stackblitz</a>.</p>