Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept Partial of Component in NbDialogService open context #1175

Merged
merged 6 commits into from
Feb 18, 2019
3 changes: 2 additions & 1 deletion src/framework/theme/components/dialog/dialog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ export class NbDialogService {
/**
* Opens new instance of the dialog, may receive optional config.
* */
open<T>(content: Type<T> | TemplateRef<T>, userConfig: Partial<NbDialogConfig<T>> = {}): NbDialogRef<T> {
open<T>(content: Type<T> | TemplateRef<T>,
userConfig: Partial<NbDialogConfig<Partial<T> | string>> = {}): NbDialogRef<T> {
Tibing marked this conversation as resolved.
Show resolved Hide resolved
const config = new NbDialogConfig({ ...this.globalConfig, ...userConfig });
const overlayRef = this.createOverlay(config);
const dialogRef = new NbDialogRef<T>(overlayRef);
Expand Down