mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 22:43:03 +00:00
71712: Test fixes: eventemitter to subject in confirmation modal
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { Component, Input, Output } from '@angular/core';
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { Subject } from 'rxjs/internal/Subject';
|
||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||
|
||||
@Component({
|
||||
@@ -18,7 +18,7 @@ export class ConfirmationModalComponent {
|
||||
* An event fired when the cancel or confirm button is clicked, with respectively false or true
|
||||
*/
|
||||
@Output()
|
||||
response = new EventEmitter<boolean>();
|
||||
response: Subject<boolean> = new Subject();
|
||||
|
||||
constructor(protected activeModal: NgbActiveModal) {
|
||||
}
|
||||
@@ -27,7 +27,7 @@ export class ConfirmationModalComponent {
|
||||
* Confirm the action that led to the modal
|
||||
*/
|
||||
confirmPressed() {
|
||||
this.response.emit(true);
|
||||
this.response.next(true);
|
||||
this.close();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export class ConfirmationModalComponent {
|
||||
* Cancel the action that led to the modal and close modal
|
||||
*/
|
||||
cancelPressed() {
|
||||
this.response.emit(false);
|
||||
this.response.next(false);
|
||||
this.close();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user