Fix create menu and viewer evaluators not in sync with store values (#1634)

This commit is contained in:
arditdomi
2020-08-26 10:09:22 +01:00
committed by GitHub
parent fc88eb0c97
commit 651fb56ec6
3 changed files with 7 additions and 6 deletions

View File

@@ -40,6 +40,7 @@ import { Subject } from 'rxjs';
export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy { export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy {
@Input() @Input()
nodeId: string; nodeId: string;
@Input() @Input()
node: MinimalNodeEntity; node: MinimalNodeEntity;

View File

@@ -25,7 +25,7 @@
import { Component, Input, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core'; import { Component, Input, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core';
import { ContentActionRef } from '@alfresco/adf-extensions'; import { ContentActionRef } from '@alfresco/adf-extensions';
import { AppStore, getCurrentFolder } from '@alfresco/aca-shared/store'; import { AppStore, getRuleContext } from '@alfresco/aca-shared/store';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
@@ -52,7 +52,7 @@ export class CreateMenuComponent implements OnInit, OnDestroy {
ngOnInit() { ngOnInit() {
this.store this.store
.select(getCurrentFolder) .select(getRuleContext)
.pipe(takeUntil(this.onDestroy$)) .pipe(takeUntil(this.onDestroy$))
.subscribe(() => { .subscribe(() => {
this.createActions = this.extensions.getCreateActions(); this.createActions = this.extensions.getCreateActions();

View File

@@ -26,7 +26,7 @@
import { AppExtensionService, ContentApiService } from '@alfresco/aca-shared'; import { AppExtensionService, ContentApiService } from '@alfresco/aca-shared';
import { import {
AppStore, AppStore,
getAppSelection, getRuleContext,
isInfoDrawerOpened, isInfoDrawerOpened,
SetSelectedNodesAction, SetSelectedNodesAction,
ClosePreviewAction, ClosePreviewAction,
@@ -125,10 +125,10 @@ export class AppViewerComponent implements OnInit, OnDestroy {
}); });
this.store this.store
.select(getAppSelection) .select(getRuleContext)
.pipe(takeUntil(this.onDestroy$)) .pipe(takeUntil(this.onDestroy$))
.subscribe((selection) => { .subscribe((ruleContext) => {
this.selection = selection; this.selection = ruleContext.selection;
this.toolbarActions = this.extensions.getViewerToolbarActions(); this.toolbarActions = this.extensions.getViewerToolbarActions();
this.openWith = this.extensions.openWithActions; this.openWith = this.extensions.openWithActions;