How to customize mat-select dropdown position?

后端 未结 4 769
难免孤独
难免孤独 2020-12-17 10:38

Its been couple of days since i have not found the solution for this. As there is an option for mat-menu that is overlaptrigger property but there is no property to perform

4条回答
  •  暖寄归人
    2020-12-17 11:17

    
        
            {{locale}}
        
    
    

    Utilize disableOptionCentering and panelClass like I have above. Then within your styles.scss reference your panelClass and do

    .myPanelClass{
        margin-top: 30px !important; 
    }
    

    This worked for me. Note that the scss must be in your styles.scss not your component's scss file. You might not need to use important here, I have other classes around this so I did use it.

提交回复
热议问题