Skip to content

Commit 2a7b6be

Browse files
fix: deleting btns no longer removes two of them
1 parent b215d0d commit 2a7b6be

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

apps/back-office/src/app/dashboard/pages/dashboard/dashboard.component.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ <h1 class="!m-0 overflow-hidden text-ellipsis">
3434
[icon]="dashboard.page?.visible ? 'visibility' : 'visibility_off'"
3535
(click)="togglePageVisibility()"
3636
[uiTooltip]="
37-
(dashboard.page?.visible ? 'components.application.pages.hide' : 'components.application.pages.show')
38-
| translate
39-
"
37+
(dashboard.page?.visible
38+
? 'components.application.pages.hide'
39+
: 'components.application.pages.show'
40+
) | translate
41+
"
4042
>
4143
</ui-button>
4244
</div>
@@ -47,7 +49,11 @@ <h1 class="!m-0 overflow-hidden text-ellipsis">
4749
(cdkDropListDropped)="onButtonActionDrop($event)"
4850
>
4951
<!-- Button actions -->
50-
<safe-button-action [buttonActions]="buttonActions" [dashboard]="dashboard" [canUpdate]="canUpdate"></safe-button-action>
52+
<safe-button-action
53+
[buttonActions]="buttonActions"
54+
[dashboard]="dashboard"
55+
[canUpdate]="canUpdate"
56+
></safe-button-action>
5157

5258
<!-- Fullscreen -->
5359
<ui-button

libs/safe/src/lib/components/button-action/button-action.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export class ButtonActionComponent {
7979
const currButtons = this.dashboard?.buttons || [];
8080
currButtons.splice(idx, 1);
8181
this.dashboardService.saveDashboardButtons(currButtons);
82-
this.buttonActions.splice(idx, 1);
8382
}
8483
});
8584
}

0 commit comments

Comments
 (0)