Skip to content

Commit bb6f61b

Browse files
committed
fix(material/select): provide horizontal fallback positions (#27267)
The select had configured its positions under the assumption that the dropdown is always as wide as the trigger so it only provided a vertical fallback position. Since users are now able to control the panel width, we also need horizontal fallbacks. Fixes #27256. (cherry picked from commit fd9591b)
1 parent 8791d59 commit bb6f61b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/material/select/select.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,13 +1303,26 @@ export class MatSelect extends _MatSelectBase<MatSelectChange> implements OnInit
13031303
overlayX: 'start',
13041304
overlayY: 'top',
13051305
},
1306+
{
1307+
originX: 'end',
1308+
originY: 'bottom',
1309+
overlayX: 'end',
1310+
overlayY: 'top',
1311+
},
13061312
{
13071313
originX: 'start',
13081314
originY: 'top',
13091315
overlayX: 'start',
13101316
overlayY: 'bottom',
13111317
panelClass: 'mat-mdc-select-panel-above',
13121318
},
1319+
{
1320+
originX: 'end',
1321+
originY: 'top',
1322+
overlayX: 'end',
1323+
overlayY: 'bottom',
1324+
panelClass: 'mat-mdc-select-panel-above',
1325+
},
13131326
];
13141327

13151328
/** Ideal origin for the overlay panel. */

0 commit comments

Comments
 (0)