Hide/show la popin d'infos des sauts
This commit is contained in:
@@ -25,6 +25,7 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
public dataSourceTable;
|
||||
public resultsLength = 0;
|
||||
private previousElementId = -1;
|
||||
private closePopin = false;
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
|
||||
constructor(
|
||||
@@ -56,15 +57,16 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
this.previousElementId = elementId;
|
||||
}
|
||||
|
||||
if (elementId != this.previousElementId ) {
|
||||
this.closePopin = (elementId === this.previousElementId);
|
||||
if (elementId != this.previousElementId) {
|
||||
this.previousElementId = elementId;
|
||||
}
|
||||
}
|
||||
|
||||
calculateClasses(item) {
|
||||
return {
|
||||
'showPopin': item.id === this.previousElementId,
|
||||
'hidePopin': item.id != this.previousElementId,
|
||||
'showPopin': !this.closePopin || item.id === this.previousElementId,
|
||||
'hidePopin': this.closePopin || item.id != this.previousElementId,
|
||||
'stylePopin': true
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user