Skip to content

Commit

Permalink
fix(material/autocomplete): resets autocomplete panel positionStrateg…
Browse files Browse the repository at this point in the history
…y when not in mobile landscape

Updates the previous fix which checks for Breakpoint.HandsetLandscape and applies flexibleDimensions
withGrowAfterOpen and adds withViewportMargin and removes those values if Breakpoint.HandsetLandscape
is false.

Fixes b/284148377
  • Loading branch information
essjay05 committed Jun 5, 2024
1 parent 453feb0 commit 0d05515
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/material/autocomplete/autocomplete-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,10 @@ export class MatAutocompleteTrigger
.withGrowAfterOpen(true)
.withViewportMargin(8);
} else {
this._positionStrategy.withGrowAfterOpen(false);
this._positionStrategy
.withFlexibleDimensions(false)
.withGrowAfterOpen(false)
.withViewportMargin(0);
}
});
} else {
Expand Down

0 comments on commit 0d05515

Please sign in to comment.