Skip to content

Commit 491a26d

Browse files
committed
added autoclose
1 parent a87f1b2 commit 491a26d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

projects/angular-rave/src/lib/angular-rave.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class AngularRaveComponent implements OnInit {
3232
@Input() redirect_url: string;
3333
@Input() custom_logo: string;
3434
@Input() meta: any;
35+
@Input() autoclose = true;
3536
@Input() raveOptions: Partial<PrivateRaveOptions>;
3637
@Output() onclose: EventEmitter<void> = new EventEmitter<void>();
3738
@Output() callback: EventEmitter<Object> = new EventEmitter<Object>();
@@ -68,7 +69,9 @@ export class AngularRaveComponent implements OnInit {
6869
if (this.onclose) { this._raveOptions.onclose = () => this.onclose.emit(); }
6970
this._raveOptions.callback = (res) => {
7071
this.onclose.emit(res);
71-
this.paymentSetup.close();
72+
if (this.autoclose) {
73+
this.paymentSetup.close();
74+
}
7275
};
7376
}
7477

0 commit comments

Comments
 (0)