From 4fb093568cfaf9ef55cb11bb93ec6d897d59c835 Mon Sep 17 00:00:00 2001 From: Devon A Thomson Date: Thu, 3 Sep 2020 13:32:24 -0400 Subject: [PATCH] used isEqual to re-initialize on changes in editor --- src/plugins/input_control_vis/public/vis_controller.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/input_control_vis/public/vis_controller.tsx b/src/plugins/input_control_vis/public/vis_controller.tsx index 49f3a9e53f3eb..e0ed97eef0e5f 100644 --- a/src/plugins/input_control_vis/public/vis_controller.tsx +++ b/src/plugins/input_control_vis/public/vis_controller.tsx @@ -18,6 +18,7 @@ */ import React from 'react'; +import { isEqual } from 'lodash'; import { render, unmountComponentAtNode } from 'react-dom'; import { I18nStart } from 'kibana/public'; @@ -54,7 +55,7 @@ export const createInputControlVisController = (deps: InputControlVisDependencie } async render(visData: any, visParams: VisParams) { - if (!this.isLoaded) { + if (!this.isLoaded || !isEqual(visParams, this.visParams)) { this.visParams = visParams; this.controls = []; this.controls = await this.initControls();