mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Dashboard] Unlink from library / Save to library actions do not work… (#150338)
… for maximized panels #139915 ## Summary As suggested in the issue comments https://github.com/elastic/kibana/issues/139915#issuecomment-1234408466, in this PR I added some logic after linking/unlinking to the library to set the expanded visualization id to undefined. After testing this changes in a local development environment, the visualization is no longer disappearing from the dashboard after linking/unlinking to the library
This commit is contained in:
parent
1d0b90bd12
commit
c71725ee46
2 changed files with 6 additions and 0 deletions
|
@ -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',
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue