How to assign value to the Angular Material Constants like SELECT_PANEL_MAX_HEIGHT Which are provided in the official angular Material Documentation here
How to assign value to the Angular Material Constants like SELECT_PANEL_MAX_HEIGHT Which are provided in the official angular Material Documentation here
Constants such as SELECT_PANEL_MAX_HEIGHT is read only. You can only override options which have a special Injection token. For example: MAT_TOOLTIP_DEFAULT_OPTIONS for Material tooltip.
import { MAT_TOOLTIP_DEFAULT_OPTIONS } from "@angular/material";
...
providers: [
{
provide: MAT_TOOLTIP_DEFAULT_OPTIONS,
useValue: {
showDelay: 500,
hideDelay: 300
}
}
]
Another option to make the select panel bigger or smaller:
::ng-deep .mat-select-panel {
max-height: 80vh !important;
}
see https://github.com/angular/components/issues/11780, the following worked for me:
.mat-select-panel {
max-height: 300px!important;
}