Skip to content

Commit

Permalink
used isEqual to re-initialize on changes in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomThomson committed Sep 3, 2020
1 parent 3e38486 commit 4fb0935
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/input_control_vis/public/vis_controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

import React from 'react';
import { isEqual } from 'lodash';
import { render, unmountComponentAtNode } from 'react-dom';

import { I18nStart } from 'kibana/public';
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 4fb0935

Please sign in to comment.