Skip to content

Commit

Permalink
doc: Added a new button to duplicate a dashboard widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaas-Ritense committed Jan 16, 2025
1 parent f0a5b1f commit 57ba175
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export class DashboardDetailsComponent implements AfterViewInit {
label: 'Edit',
callback: this.editWidget.bind(this),
},
{
label: 'Duplicate',
callback: this.duplicateWidget.bind(this),
},
{
label: 'Delete',
callback: this.deleteWidget.bind(this),
Expand Down Expand Up @@ -161,6 +165,12 @@ export class DashboardDetailsComponent implements AfterViewInit {
this.showModal();
}

private duplicateWidget(event: DashboardWidgetConfiguration): void {
this.editWidgetConfiguration$.next({...event});
this.modalType = 'create';
this.showModal();
}

private setFields(): void {
this.fields = [
{
Expand Down

0 comments on commit 57ba175

Please sign in to comment.