Skip to content

Commit a419788

Browse files
committed
fix(drop-down): merge provided in open overlay settings
1 parent cc64187 commit a419788

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

projects/igniteui-angular/src/lib/dialog/dialog.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ export class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, After
478478
const eventArgs: IDialogCancellableEventArgs = { dialog: this, event: null, cancel: false };
479479
this.opening.emit(eventArgs);
480480
if (!eventArgs.cancel) {
481+
overlaySettings = { ...{}, ... this._overlayDefaultSettings, ...overlaySettings };
481482
this.toggleRef.open(overlaySettings);
482483
this.isOpenChange.emit(true);
483484
if (!this.leftButtonLabel && !this.rightButtonLabel) {

projects/igniteui-angular/src/lib/drop-down/drop-down.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,7 @@ describe('IgxDropDown ', () => {
12651265
expect(dropdown.closing.emit).toHaveBeenCalledTimes(3);
12661266
expect(dropdown.closed.emit).toHaveBeenCalledTimes(3);
12671267
}));
1268-
fit('#15137 - should bind to custom target if provided', fakeAsync(() => {
1268+
it('#15137 - should bind to custom target if provided', fakeAsync(() => {
12691269
const input = fixture.debugElement.query(By.css('input'));
12701270
dropdown.open({ target: input.nativeElement });
12711271
tick();

projects/igniteui-angular/src/lib/drop-down/drop-down.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export class IgxDropDownComponent extends IgxDropDownBaseDirective implements ID
243243
* ```
244244
*/
245245
public open(overlaySettings?: OverlaySettings) {
246-
const settings = overlaySettings || this.getDefaultOverlaySettings();
246+
const settings = { ... {}, ...this.getDefaultOverlaySettings(), ...overlaySettings };
247247
this.toggleDirective.open(settings);
248248
this.updateScrollPosition();
249249
}

0 commit comments

Comments
 (0)