title: How to set the number of items in mat-autocomplete
body: <p>I'm now trying to change the number of items in a mat-autocomplete for a while without success. I'm using material.angular.io</p>
  
  <p>Here's my code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Component, OnInit } from '@angular/core';
  
  @Component({
    selector: 'app-add-and-search',
    templateUrl: './add-and-search.component.html',
    styleUrls: ['./add-and-search.component.css']
  })
  export class AddAndSearchComponent implements OnInit {
  
    items: string[] = ['Item 1', 'Item 2', 'Item 3', 'Item 4', 'Item 5'];
  
    constructor() { }
  
    ngOnInit() {
    }
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;mat-form-field appearance="standard"&gt;
    &lt;mat-label&gt;Search...&lt;/mat-label&gt;
    &lt;input matInput placeholder="Search..." [matAutocomplete]="auto"&gt;
    &lt;mat-icon matSuffix&gt;search&lt;/mat-icon&gt;
  &lt;/mat-form-field&gt;
  
  &lt;mat-autocomplete #auto="matAutocomplete"&gt;
    &lt;mat-optgroup label="Items"&gt;
      &lt;mat-option *ngFor="let item of items" [value]="item"&gt;{{item}}&lt;/mat-option&gt;
      &lt;mat-option&gt;&lt;mat-icon&gt;add&lt;/mat-icon&gt;Add&lt;/mat-option&gt;
    &lt;/mat-optgroup&gt;
  &lt;/mat-autocomplete&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>From the docs I learned that the autocomplete panel has a constant height of 256px (<a href="https://material.angular.io/components/autocomplete/api#AUTOCOMPLETE_PANEL_HEIGHT" rel="nofollow noreferrer">https://material.angular.io/components/autocomplete/api#AUTOCOMPLETE_PANEL_HEIGHT</a>).</p>
  
  <p>My question is: How can I change the autocomplete panel to display more items. Let's say 10. If there is no intended way of doing this could someone give me a hint on a CSS trick to set the height e.g. to 512px instead of the default 256px?</p>
  
  <p>Many thanks!</p>