From 3b87640c9e141b392dd43b975687deb0f3d488d6 Mon Sep 17 00:00:00 2001 From: Milan Patel Date: Tue, 27 Jun 2023 23:39:04 +0530 Subject: [PATCH] feat: Add refresh button to cloud config --- 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 ( - -