-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[maps embeddable] fix map layers disappear from map panel when using …
…session storage to continue editing a dashboard (#193629) Closes #190468 and #193601 Dashboard unsaved changes for a panel are obtained from the embeddable comparator subject for each comparator. If comparator subject does not return a value, then this information is lost when returning to a dashboard with unsaved changes. This is why layers and filters where disappearing from a map when returning to a dashboard with unsaved changes. This PR resolves this issue by providing comparator subjects and setters for `savedObjectId`, `attributes`, and `mapSettings`. PR also resolves issue of passing props from `MapRenderer` component into map embeddable. Instead of passing props via state, props should be passed from `MapRenderer` parent api. --------- Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
f6c5dd9
commit a8ebc7f
Showing
10 changed files
with
79 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
x-pack/plugins/maps/public/react_embeddable/map_renderer/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { HasType, apiIsOfType } from '@kbn/presentation-publishing'; | ||
import { RenderToolTipContent } from '../../classes/tooltips/tooltip_property'; | ||
|
||
export const MAP_RENDERER_TYPE = 'mapRenderer'; | ||
|
||
export type MapRendererApi = HasType<typeof MAP_RENDERER_TYPE> & { | ||
getTooltipRenderer?: () => RenderToolTipContent; | ||
hideFilterActions?: boolean; | ||
isSharable?: boolean; | ||
}; | ||
|
||
export function isMapRendererApi(api: unknown): api is MapRendererApi { | ||
return Boolean(api && apiIsOfType(api, MAP_RENDERER_TYPE)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters