Skip to content

Commit 134a85c

Browse files
committed
fix(drop-down): merge provided in open overlay settings
1 parent 7ce93b2 commit 134a85c

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
@@ -479,6 +479,7 @@ export class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, After
479479
const eventArgs: IDialogCancellableEventArgs = { dialog: this, event: null, cancel: false };
480480
this.opening.emit(eventArgs);
481481
if (!eventArgs.cancel) {
482+
overlaySettings = { ...{}, ... this._overlayDefaultSettings, ...overlaySettings };
482483
this.toggleRef.open(overlaySettings);
483484
this.isOpenChange.emit(true);
484485
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
@@ -244,7 +244,7 @@ export class IgxDropDownComponent extends IgxDropDownBaseDirective implements ID
244244
* ```
245245
*/
246246
public open(overlaySettings?: OverlaySettings) {
247-
const settings = overlaySettings || this.getDefaultOverlaySettings();
247+
const settings = { ... {}, ...this.getDefaultOverlaySettings(), ...overlaySettings };
248248
this.toggleDirective.open(settings);
249249
this.updateScrollPosition();
250250
}

0 commit comments

Comments
 (0)