From 6d4ed1bf422ab8661f34d388c023277dc681a6a3 Mon Sep 17 00:00:00 2001 From: sumeyyeKurtulus Date: Mon, 29 Apr 2024 16:54:04 +0300 Subject: [PATCH] add: hasAvailableActions condition to check the related availibility beforehand --- .../grid-actions/grid-actions.component.html | 76 ++++++++++--------- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/grid-actions/grid-actions.component.html b/npm/ng-packs/packages/components/extensible/src/lib/components/grid-actions/grid-actions.component.html index 4fcf67fcfc..08eb4ed229 100644 --- a/npm/ng-packs/packages/components/extensible/src/lib/components/grid-actions/grid-actions.component.html +++ b/npm/ng-packs/packages/components/extensible/src/lib/components/grid-actions/grid-actions.component.html @@ -1,42 +1,46 @@ -@if (actionList.length > 1) { -
- -
- @for (action of actionList; track action.text) { - 1) { +
+
-
-} @if (actionList.length === 1) { - + {{ text | abpLocalization }} + +
+ @for (action of actionList; track action.text) { + + + } +
+
+ } + + @if (actionList.length === 1) { + + } } @if (action.visible(data)) { - + } @@ -60,7 +64,9 @@ type="button" [class]="action.btnClass" [style]="action.btnStyle" - [ngbTooltip]="action.tooltip.text | abpLocalization" [placement]="action.tooltip.placement || 'auto'" container="body" + [ngbTooltip]="action.tooltip.text | abpLocalization" + [placement]="action.tooltip.placement || 'auto'" + container="body" >