From be212b0ad6c777f7c5ee9a74cac0affa63faa1c1 Mon Sep 17 00:00:00 2001 From: patelmilanun <20059797+patelmilanun@users.noreply.github.com> Date: Wed, 28 Jun 2023 04:52:43 +0530 Subject: [PATCH] feat: Add refresh button to Cloud Config page (#2480) --- src/dashboard/Data/Config/Config.react.js | 28 +++++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/dashboard/Data/Config/Config.react.js b/src/dashboard/Data/Config/Config.react.js index 80f83d08d1..2a8cced573 100644 --- a/src/dashboard/Data/Config/Config.react.js +++ b/src/dashboard/Data/Config/Config.react.js @@ -19,6 +19,7 @@ import subscribeTo from 'lib/subscribeTo'; import TableHeader from 'components/Table/TableHeader.react'; import TableView from 'dashboard/TableView.react'; import Toolbar from 'components/Toolbar/Toolbar.react'; +import browserStyles from 'dashboard/Data/Browser/Browser.scss'; @subscribeTo('Config', 'config') class Config extends TableView { @@ -38,7 +39,7 @@ class Config extends TableView { } componentWillMount() { - this.props.config.dispatch(ActionTypes.FETCH); + this.loadData(); } componentWillReceiveProps(nextProps, nextContext) { @@ -47,12 +48,29 @@ class Config extends TableView { } } + onRefresh() { + this.loadData(); + } + + loadData() { + this.props.config.dispatch(ActionTypes.FETCH); + } + renderToolbar() { return ( - -