diff --git a/src/app/core/common-components/entity-subrecord/entity-subrecord/entity-subrecord.component.ts b/src/app/core/common-components/entity-subrecord/entity-subrecord/entity-subrecord.component.ts index 6898a18534..7fa7369918 100644 --- a/src/app/core/common-components/entity-subrecord/entity-subrecord/entity-subrecord.component.ts +++ b/src/app/core/common-components/entity-subrecord/entity-subrecord/entity-subrecord.component.ts @@ -94,7 +94,6 @@ export interface TableRow { }) export class EntitySubrecordComponent implements OnChanges { @Input() isLoading: boolean; - @Input() clickMode: "popup" | "navigate" | "none" = "popup"; @Input() showInactive = false; @@ -115,6 +114,9 @@ export class EntitySubrecordComponent implements OnChanges { /** data to be displayed, can also be used as two-way-binding */ @Input() records: T[] = []; + /** output the currently displayed records, whenever filters for the user change */ + @Output() filteredRecordsChange = new EventEmitter(); + /** * factory method to create a new instance of the displayed Entity type * used when the user adds a new entity to the list. @@ -266,6 +268,9 @@ export class EntitySubrecordComponent implements OnChanges { this.sortDefault(); } + this.filteredRecordsChange.emit( + this.recordsDataSource.filteredData.map((item) => item.record), + ); this.listenToEntityUpdates(); } diff --git a/src/app/core/entity-list/entity-list/entity-list.component.html b/src/app/core/entity-list/entity-list/entity-list.component.html index c90de3afd5..1c3ebea433 100644 --- a/src/app/core/entity-list/entity-list/entity-list.component.html +++ b/src/app/core/entity-list/entity-list/entity-list.component.html @@ -129,6 +129,7 @@

{{ listName }}

[filter]="filterObj" [defaultSort]="listConfig?.defaultSort" [showInactive]="showInactive" + (filteredRecordsChange)="filteredData = $event" > @@ -183,7 +184,25 @@

{{ listName }}

aria-label="download csv" icon="download" > - Download CSV + Download all data (.csv) + + +