Skip to content

Commit

Permalink
[Dashboard] Unlink from library / Save to library actions do not work…
Browse files Browse the repository at this point in the history
… for maximized panels elastic#139915

- As stated in the issue comments, after linking/unlinking to the library, the expanded panel id is reset to undefined
  • Loading branch information
dmprieto committed Feb 3, 2023
1 parent 7288b84 commit 032ab0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export class AddToLibraryAction implements Action<AddToLibraryActionContext> {
const title = dashboardAddToLibraryActionStrings.getSuccessMessage(
embeddable.getTitle() ? `'${embeddable.getTitle()}'` : ''
);
if (dashboard.getExpandedPanelId() !== undefined) {
dashboard.setExpandedPanelId(undefined);
}
this.toastsService.addSuccess({
title,
'data-test-subj': 'addPanelToLibrarySuccess',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ export class UnlinkFromLibraryAction implements Action<UnlinkFromLibraryActionCo
const title = dashboardUnlinkFromLibraryActionStrings.getSuccessMessage(
embeddable.getTitle() ? `'${embeddable.getTitle()}'` : ''
);
if (dashboard.getExpandedPanelId() !== undefined) {
dashboard.setExpandedPanelId(undefined);
}

this.toastsService.addSuccess({
title,
Expand Down

0 comments on commit 032ab0a

Please sign in to comment.