From 8602281abd4fef31300673717f3f2dd498082987 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:26:50 +1100 Subject: [PATCH] [8.16] [Dashboard] Fix incorrect actions in edit mode after discarding unsaved changes (#200230) (#200278) # Backport This will backport the following commits from `main` to `8.16`: - [[Dashboard] Fix incorrect actions in edit mode after discarding unsaved changes (#200230)](https://github.com/elastic/kibana/pull/200230) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Catherine Liu --- x-pack/plugins/embeddable_enhanced/public/plugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/embeddable_enhanced/public/plugin.ts b/x-pack/plugins/embeddable_enhanced/public/plugin.ts index f05982af78947..a76f33f095951 100644 --- a/x-pack/plugins/embeddable_enhanced/public/plugin.ts +++ b/x-pack/plugins/embeddable_enhanced/public/plugin.ts @@ -148,8 +148,8 @@ export class EmbeddableEnhancedPlugin ); const api: DynamicActionStorageApi = { dynamicActionsState$, - setDynamicActions: (newState) => { - dynamicActionsState$.next(newState); + setDynamicActions: (enhancements) => { + dynamicActionsState$.next(getDynamicActionsState(enhancements)); }, }; const storage = new DynamicActionStorage(uuid, getTitle, api);