From 450402050c99edc8238838fb217002a0a6b8786b Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Thu, 19 Nov 2020 11:42:43 +0300 Subject: [PATCH] Use context instead of consumer --- .../components/panel_config/table.js | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/plugins/vis_type_timeseries/public/application/components/panel_config/table.js b/src/plugins/vis_type_timeseries/public/application/components/panel_config/table.js index a89e24923b8bb..aeabea388a7c6 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/panel_config/table.js +++ b/src/plugins/vis_type_timeseries/public/application/components/panel_config/table.js @@ -47,6 +47,7 @@ import { QueryBarWrapper } from '../query_bar_wrapper'; import { getDefaultQueryLanguage } from '../lib/get_default_query_language'; import { VisDataContext } from './../../contexts/vis_data_context'; export class TablePanelConfig extends Component { + static contextType = VisDataContext; constructor(props) { super(props); this.state = { selectedTab: 'data' }; @@ -116,19 +117,15 @@ export class TablePanelConfig extends Component { /> } > - - {(visData) => ( - - )} - +