mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Add trackby function so cdktree can differentiate between new and old nodes
(cherry picked from commit 5f71de885b
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
46ac61dcac
commit
9fc4e213df
@@ -1,5 +1,5 @@
|
||||
<ds-themed-loading *ngIf="(dataSource.loading$ | async) && !loadingNode" class="ds-themed-loading"></ds-themed-loading>
|
||||
<cdk-tree [dataSource]="dataSource" [treeControl]="treeControl">
|
||||
<cdk-tree [dataSource]="dataSource" [treeControl]="treeControl" [trackBy]="trackBy">
|
||||
<!-- This is the tree node template for show more node -->
|
||||
<cdk-tree-node *cdkTreeNodeDef="let node; when: isShowMore" cdkTreeNodePadding
|
||||
class="example-tree-node show-more-node">
|
||||
|
@@ -30,6 +30,7 @@ export class CommunityListComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
|
||||
dataSource: CommunityListDatasource;
|
||||
trackBy = (index, node: FlatNode) => node.id;
|
||||
|
||||
paginationConfig: FindListOptions;
|
||||
|
||||
|
Reference in New Issue
Block a user