diff --git a/src/app/shared/context-menu/context-menu.component.ts b/src/app/shared/context-menu/context-menu.component.ts index 4c83924c417..26c283a8570 100644 --- a/src/app/shared/context-menu/context-menu.component.ts +++ b/src/app/shared/context-menu/context-menu.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectorRef, Component, Inject, Injector, Input, OnInit } from '@angular/core'; +import { AfterViewChecked, ChangeDetectorRef, Component, Inject, Injector, Input, OnInit } from '@angular/core'; import { DOCUMENT } from '@angular/common'; import { from, Observable } from 'rxjs'; @@ -24,7 +24,7 @@ import { GenericConstructor } from '../../core/shared/generic-constructor'; styleUrls: ['./context-menu.component.scss'], templateUrl: './context-menu.component.html' }) -export class ContextMenuComponent implements OnInit { +export class ContextMenuComponent implements OnInit, AfterViewChecked { /** * The related item @@ -124,10 +124,6 @@ export class ContextMenuComponent implements OnInit { ); } - isItem(): boolean { - return this.contextMenuObjectType === DSpaceObjectType.ITEM; - } - ngAfterViewChecked() { // To check that Context-menu contains options or not if (this._document.getElementById('itemOptionsDropdownMenu')) {