From da8abdaf754e954b442ed7b81cd3e2fa62a0bf2b Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Wed, 20 Jan 2021 14:29:47 -0700 Subject: [PATCH] [Maps] fix tags changed in Maps Save dialog don't refresh until the map is reopened (#88849) * [Maps] fix tags changed in Maps Save dialog don't refresh until the map is reopened * only set tags if newTags are provided --- .../maps/public/routes/map_page/saved_map/saved_map.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts b/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts index f3c3ec528c03..27fd78980710 100644 --- a/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts +++ b/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts @@ -292,8 +292,12 @@ export class SavedMap { const prevTitle = this._attributes.title; const prevDescription = this._attributes.description; + const prevTags = this._tags; this._attributes.title = newTitle; this._attributes.description = newDescription; + if (newTags) { + this._tags = newTags; + } this._syncAttributesWithStore(); let updatedMapEmbeddableInput: MapEmbeddableInput; @@ -316,6 +320,7 @@ export class SavedMap { // Error toast displayed by wrapAttributes this._attributes.title = prevTitle; this._attributes.description = prevDescription; + this._tags = prevTags; return; }