Search code examples
angularjssizemd-autocomplete

md-autocomplete dropdown size not stable


I'm using an existing md-autocomplete input.

My issue is that the size of the dropdown is variable. It may have a lot of result in the dropdown and still it limits the size of the md-autocomplete to 2. And we can scroll to access all of them.

But it's not what it should.

How can i force it to show the same size all the time ? Or a true automatic size.


Solution

  • Try to set style:

    .md-virtual-repeat-scroller{
       height: 506px; 
      max-height: 506px; 
      min-height: 506px; 
    }
    
    md-virtual-repeat-container{
      height: 506px; 
      max-height: 506px; 
      min-height: 506px; 
    }
    

    Demo Codepen