Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 0df0b067 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Fixed double click error on search table

parent 68745e59
No related branches found
No related tags found
No related merge requests found
...@@ -260,6 +260,9 @@ export class SearchTableComponent implements OnInit { ...@@ -260,6 +260,9 @@ export class SearchTableComponent implements OnInit {
const formRef: MatDialogRef<any> = this.searchTableController.newDialog({ const formRef: MatDialogRef<any> = this.searchTableController.newDialog({
data: {edit: false} data: {edit: false}
}); });
if (!formRef) {
return;
}
formRef.afterClosed().subscribe(result => { formRef.afterClosed().subscribe(result => {
if (result) { if (result) {
this.rows = [...this.rows, {...formRef.componentInstance.getCurrent()}]; this.rows = [...this.rows, {...formRef.componentInstance.getCurrent()}];
...@@ -387,6 +390,9 @@ export class SearchTableComponent implements OnInit { ...@@ -387,6 +390,9 @@ export class SearchTableComponent implements OnInit {
const formRef: MatDialogRef<any> = this.searchTableController.newDialog({ const formRef: MatDialogRef<any> = this.searchTableController.newDialog({
data: {edit: row?.status!=EntityStatus.NEW, row} data: {edit: row?.status!=EntityStatus.NEW, row}
}); });
if (!formRef) {
return;
}
formRef.afterClosed().subscribe(result => { formRef.afterClosed().subscribe(result => {
if (result) { if (result) {
const changed = this.searchTableController.isRecordChanged(row, formRef.componentInstance.getCurrent()); const changed = this.searchTableController.isRecordChanged(row, formRef.componentInstance.getCurrent());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment