Skip to content

Commit 4d082d7

Browse files
committed
main - 097f49d fix(material/autocomplete): allow overlay backdrop by setting hasBackdrop option (#30631)
1 parent 811c7a9 commit 4d082d7

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

autocomplete/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ interface MatAutocompleteDefaultOptions {
4747
* they're interacting with the autocomplete.
4848
*/
4949
requireSelection?: boolean;
50+
/** Class to be applied to the autocomplete's backdrop. */
51+
backdropClass?: string;
52+
/** Whether the autocomplete has a backdrop. */
53+
hasBackdrop?: boolean;
5054
/** Class or list of classes to be applied to the autocomplete's overlay panel. */
5155
overlayPanelClass?: string | string[];
5256
/** Whether icon indicators should be hidden for single-selection. */

fesm2022/autocomplete.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
5555
autoSelectActiveOption: false,
5656
hideSingleSelectionIndicator: false,
5757
requireSelection: false,
58+
hasBackdrop: false,
5859
};
5960
}
6061
/** Autocomplete component. */
@@ -995,6 +996,8 @@ class MatAutocompleteTrigger {
995996
scrollStrategy: this._scrollStrategy(),
996997
width: this._getPanelWidth(),
997998
direction: this._dir ?? undefined,
999+
hasBackdrop: this._defaults?.hasBackdrop,
1000+
backdropClass: this._defaults?.backdropClass,
9981001
panelClass: this._defaults?.overlayPanelClass,
9991002
});
10001003
}

fesm2022/autocomplete.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)