title: How to open mat-expansion-panel when the form group of that panel is invalid?
body: <p>I have a <code>formArray</code> with multiple <code>formGroups</code>. Each of the <code>formGroup</code> is inside an expansion panel. Now when I click on <code>"Check what's missing"</code> button, form validation runs and shows errors for the form fields that are invalid. But if the mat-expansion-panel is closed, you can't see which fields are invalid. When I check for form validation, I want the expansion panels with invalid <code>formGroup</code> to open so that the user can see which form fields are invalid. I have added the code for your reference:</p>
  
  <p></p>
  
  <pre><code>&lt;!-- Personal Form inside Expansion Panel Personal --&gt;
  &lt;mat-expansion-panel&gt;
      &lt;mat-expansion-panel-header&gt;
          &lt;mat-panel-title&gt;
              Personal
          &lt;/mat-panel-title&gt;
      &lt;/mat-expansion-panel-header&gt;
      &lt;app-personal-form [form]="form"&gt;&lt;/app-personal-form&gt;
  &lt;/mat-expansion-panel&gt;
  
  &lt;!-- Work Form inside Expansion Panel Work --&gt;
  &lt;mat-expansion-panel&gt;
      &lt;mat-expansion-panel-header&gt;
          &lt;mat-panel-title&gt;
              Work
          &lt;/mat-panel-title&gt;
      &lt;/mat-expansion-panel-header&gt;
      &lt;app-work-form [form]="form"&gt;&lt;/app-work-form&gt;
  &lt;/mat-expansion-panel&gt;
  
  &lt;!-- Address Form inside Expansion Panel Work --&gt;
  &lt;mat-expansion-panel&gt;
      &lt;mat-expansion-panel-header&gt;
          &lt;mat-panel-title&gt;
              Address
          &lt;/mat-panel-title&gt;
      &lt;/mat-expansion-panel-header&gt;
      &lt;app-address-form [form]="form"&gt;&lt;/app-address-form&gt;
  &lt;/mat-expansion-panel&gt;
  
  &lt;div class="top-15" align="end"&gt;
      &lt;button class="btn-success" mat-raised-button [disabled]="form.valid" (click)="form.showErrors()"&gt;Check what's missing&lt;/button&gt; 
      &lt;button class="btn-success" mat-raised-button [disabled]="!form.valid || !form.dirty" (click)="save()"&gt;Save&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>