Reputation: 2314
I am using angular material select in my application which you can find here https://material.angular.io/components/select/overview. The problem is when we place the select near the bottom of the screen it, and when it is opened, It overflow the screen. This is the screenshot of what I am experiencing. What kind of css is needed to prevant this from happening.
<mat-select style="margin-bottom: 0px;" placeholder="{{input1.title}}" >
<mat-option>None</mat-option>
<mat-option *ngFor="let opt_value of input1.enumNameGroups[grp_value] let i = index" value="{{input1.enumidGroups[grp_value][i]}}" >{{opt_value}}</mat-option>
</mat-optgroup>
</mat-select>
Upvotes: 2
Views: 3260
Reputation: 15323
You can override the default css of the paginator panel to place it anywhere on the screen:
::ng-deep .mat-select-panel {
position: fixed;
bottom: 0;
left: 0;
height: 300px;
width: 100%;
}
Change the properties of the class depending on where you want to place the element.
Upvotes: 3