From d50e8d1aee3d563796ec1e184e094cdc937d0d77 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 12 Oct 2022 14:37:27 +0200 Subject: Fix action dropdown with query params --- .../app/shared/shared-main/buttons/action-dropdown.component.html | 2 +- .../src/app/shared/shared-main/buttons/action-dropdown.component.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.html b/client/src/app/shared/shared-main/buttons/action-dropdown.component.html index cdcfb9a48..474baafd7 100644 --- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.html +++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.html @@ -26,7 +26,7 @@ diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts index ad55677d8..e6164fced 100644 --- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts +++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts @@ -48,6 +48,12 @@ export class ActionDropdownComponent { return [ this.actions as DropdownAction[] ] } + getQueryParams (action: DropdownAction, entry: T) { + if (action.queryParamsBuilder) return action.queryParamsBuilder(entry) + + return {} + } + areActionsDisplayed (actions: Array | DropdownAction[]>, entry: T): boolean { return actions.some(a => { if (Array.isArray(a)) return this.areActionsDisplayed(a, entry) -- cgit v1.2.3