[ACS-6823] Fix jumping selected files action bar (#3689)

This commit is contained in:
tomson
2024-04-11 10:31:08 +02:00
committed by GitHub
parent dd8f97afc1
commit 4fed173552

View File

@@ -93,7 +93,7 @@ export class DocumentListDirective implements OnInit, OnDestroy {
.subscribe(() => this.onReady()); .subscribe(() => this.onReady());
this.appHookService.reload.pipe(takeUntil(this.onDestroy$)).subscribe(() => { this.appHookService.reload.pipe(takeUntil(this.onDestroy$)).subscribe(() => {
this.reload(this.selectedNode); this.reload();
}); });
this.appHookService.reset.pipe(takeUntil(this.onDestroy$)).subscribe(() => { this.appHookService.reset.pipe(takeUntil(this.onDestroy$)).subscribe(() => {
@@ -166,13 +166,9 @@ export class DocumentListDirective implements OnInit, OnDestroy {
this.store.dispatch(new SetSelectedNodesAction(selection)); this.store.dispatch(new SetSelectedNodesAction(selection));
} }
private reload(selectedNode?: NodeEntry) { private reload() {
this.documentList.resetSelection(); this.documentList.resetSelection();
if (selectedNode) { this.store.dispatch(new SetSelectedNodesAction([]));
this.store.dispatch(new SetSelectedNodesAction([selectedNode]));
} else {
this.store.dispatch(new SetSelectedNodesAction([]));
}
this.documentList.reload(); this.documentList.reload();
} }