Skip to content
This repository was archived by the owner on Jan 4, 2026. It is now read-only.
This repository was archived by the owner on Jan 4, 2026. It is now read-only.

Not able to override MAT OPTION minimum width #526

@Hiteshnandwana

Description

@Hiteshnandwana

I am not able to override minimum width of mat-options in angular material. angular material is using overlay.
I tried to override minimum width using angular material CDK , But I am not able to override.
when I checked using console, I get to know that minimum width given by me is getting replace by angular material when I am opening the options.
NOTE: I am able to override minimum Height but not able to override minimum width.

my code is here

@ViewChild('target1') target: MatSelect;

ngAfterViewInit() {
var dds = this.target
dds.overlayDir.width = '60vw';
dds.overlayDir.minHeight = '200px';
dds.overlayDir.minWidth = '20px !important';
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions