Skip to content

Commit

Permalink
Adds type to renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey Robertson committed Feb 4, 2020
1 parent 785e533 commit 305b66c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export class RenderedElementComponent extends PureComponent<Props> {
done: () => {},
onDestroy: () => {},
onResize: () => {},
getElementId: () => '',
setFilter: () => {},
getFilter: () => '',
onEmbeddableInputChange: () => {},
Expand Down
2 changes: 2 additions & 0 deletions x-pack/legacy/plugins/canvas/types/renderers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ type GenericCallback = (callback: () => void) => void;
export interface RendererHandlers {
/** Handler to invoke when an element has finished rendering */
done: () => void;
/** Get the id of the element being rendered. Can be used as a unique ID in a render function */
getElementId: () => string;
/** Handler to invoke when an element is deleted or changes to a different render type */
onDestroy: GenericCallback;
/** Handler to invoke when an element's dimensions have changed*/
Expand Down

0 comments on commit 305b66c

Please sign in to comment.