aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/buttons/action-dropdown.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/buttons/action-dropdown.component.ts')
-rw-r--r--client/src/app/shared/buttons/action-dropdown.component.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/shared/buttons/action-dropdown.component.ts b/client/src/app/shared/buttons/action-dropdown.component.ts
index c9dbbfda2..a4200f70f 100644
--- a/client/src/app/shared/buttons/action-dropdown.component.ts
+++ b/client/src/app/shared/buttons/action-dropdown.component.ts
@@ -38,7 +38,11 @@ export class ActionDropdownComponent<T> {
38 return [ this.actions ] 38 return [ this.actions ]
39 } 39 }
40 40
41 areActionsDisplayed (actions: DropdownAction<T>[], entry: T) { 41 areActionsDisplayed (actions: Array<DropdownAction<T> | DropdownAction<T>[]>, entry: T): boolean {
42 return actions.some(a => a.isDisplayed === undefined || a.isDisplayed(entry)) 42 return actions.some(a => {
43 if (Array.isArray(a)) return this.areActionsDisplayed(a, entry)
44
45 return a.isDisplayed === undefined || a.isDisplayed(entry)
46 })
43 } 47 }
44} 48}