mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Clears resolved arg on embeddable destroy (#109945)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
dde701faaa
commit
2e4e0fca4c
1 changed files with 3 additions and 0 deletions
|
@ -14,6 +14,7 @@ import {
|
|||
import { setFilter } from '../state/actions/elements';
|
||||
import { updateEmbeddableExpression, fetchEmbeddableRenderable } from '../state/actions/embeddable';
|
||||
import { RendererHandlers, CanvasElement } from '../../types';
|
||||
import { clearValue } from '../state/actions/resolved_args';
|
||||
|
||||
// This class creates stub handlers to ensure every element and renderer fulfills the contract.
|
||||
// TODO: consider warning if these methods are invoked but not implemented by the renderer...?
|
||||
|
@ -123,6 +124,8 @@ export const createDispatchedHandlerFactory = (
|
|||
},
|
||||
|
||||
onEmbeddableDestroyed() {
|
||||
const argumentPath = [element.id, 'expressionRenderable'];
|
||||
dispatch(clearValue({ path: argumentPath }));
|
||||
dispatch(fetchEmbeddableRenderable(element.id));
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue