UI: Patch for autocoplete hasBackdrop

This commit is contained in:
Artem Dzhereleiko 2025-06-17 16:47:10 +03:00
parent 6eec7712ca
commit 81464c86ca
2 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,61 @@
diff --git a/node_modules/@angular/material/autocomplete/index.d.ts b/node_modules/@angular/material/autocomplete/index.d.ts
index 1ebc198..f572ea2 100755
--- a/node_modules/@angular/material/autocomplete/index.d.ts
+++ b/node_modules/@angular/material/autocomplete/index.d.ts
@@ -220,6 +220,10 @@ export declare interface MatAutocompleteDefaultOptions {
requireSelection?: boolean;
/** Class or list of classes to be applied to the autocomplete's overlay panel. */
overlayPanelClass?: string | string[];
+
+ backdropClass?: string;
+
+ hasBackdrop?: boolean;
/** Wheter icon indicators should be hidden for single-selection. */
hideSingleSelectionIndicator?: boolean;
}
diff --git a/node_modules/@angular/material/esm2022/autocomplete/autocomplete-trigger.mjs b/node_modules/@angular/material/esm2022/autocomplete/autocomplete-trigger.mjs
index 193f5e4..833446a 100755
--- a/node_modules/@angular/material/esm2022/autocomplete/autocomplete-trigger.mjs
+++ b/node_modules/@angular/material/esm2022/autocomplete/autocomplete-trigger.mjs
@@ -670,6 +670,8 @@ export class MatAutocompleteTrigger {
scrollStrategy: this._scrollStrategy(),
width: this._getPanelWidth(),
direction: this._dir ?? undefined,
+ hasBackdrop: this._defaults?.hasBackdrop,
+ backdropClass: this._defaults?.backdropClass,
panelClass: this._defaults?.overlayPanelClass,
});
}
diff --git a/node_modules/@angular/material/esm2022/autocomplete/autocomplete.mjs b/node_modules/@angular/material/esm2022/autocomplete/autocomplete.mjs
index 3d919a4..5fd6b4d 100755
--- a/node_modules/@angular/material/esm2022/autocomplete/autocomplete.mjs
+++ b/node_modules/@angular/material/esm2022/autocomplete/autocomplete.mjs
@@ -41,6 +41,7 @@ export function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
autoSelectActiveOption: false,
hideSingleSelectionIndicator: false,
requireSelection: false,
+ hasBackdrop: false,
};
}
/** Autocomplete component. */
diff --git a/node_modules/@angular/material/fesm2022/autocomplete.mjs b/node_modules/@angular/material/fesm2022/autocomplete.mjs
index e3d0253..36cd6d7 100755
--- a/node_modules/@angular/material/fesm2022/autocomplete.mjs
+++ b/node_modules/@angular/material/fesm2022/autocomplete.mjs
@@ -65,6 +65,7 @@ function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
autoSelectActiveOption: false,
hideSingleSelectionIndicator: false,
requireSelection: false,
+ hasBackdrop: false,
};
}
/** Autocomplete component. */
@@ -926,6 +927,8 @@ class MatAutocompleteTrigger {
scrollStrategy: this._scrollStrategy(),
width: this._getPanelWidth(),
direction: this._dir ?? undefined,
+ hasBackdrop: this._defaults?.hasBackdrop,
+ backdropClass: this._defaults?.backdropClass,
panelClass: this._defaults?.overlayPanelClass,
});
}

View File

@ -276,6 +276,8 @@ export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService)
{
provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,
useValue: {
hasBackdrop: true,
backdropClass: 'cdk-overlay-transparent-backdrop',
hideSingleSelectionIndicator: true
}
},