Skip to content

Commit 845a691

Browse files
authored
fix(material/autocomplete): default to transparent backdrop (#31647)
The autocomplete was leaving the `backdropClass` as undefined which meant that it would default to a dark one, if the user opted into it having a backdrop. Fixes #31614.
1 parent 96117bc commit 845a691

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/material/autocomplete/autocomplete-trigger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ export class MatAutocompleteTrigger
912912
width: this._getPanelWidth(),
913913
direction: this._dir ?? undefined,
914914
hasBackdrop: this._defaults?.hasBackdrop,
915-
backdropClass: this._defaults?.backdropClass,
915+
backdropClass: this._defaults?.backdropClass || 'cdk-overlay-transparent-backdrop',
916916
panelClass: this._overlayPanelClass,
917917
disableAnimations: this._animationsDisabled,
918918
});

0 commit comments

Comments
 (0)