From 10143c919830a7d001e3c8ff93ba342db09d2ed8 Mon Sep 17 00:00:00 2001 From: Laura Fuentes Grau Date: Sun, 22 Mar 2020 14:22:26 +0100 Subject: [PATCH] wip: cancel edit now resets widget --- src/dashboard/dashboard.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/dashboard/dashboard.js b/src/dashboard/dashboard.js index 11ac9e0..02e565c 100644 --- a/src/dashboard/dashboard.js +++ b/src/dashboard/dashboard.js @@ -245,6 +245,13 @@ class Dashboard extends Component { closeEdit(data){ if (data == null) { + + AppDispatcher.dispatch({ + type: 'widgets/start-load', + token: this.state.sessionToken, + param: '?dashboardID=1' + }); + this.setState({ editModal: false }); return; @@ -321,11 +328,6 @@ class Dashboard extends Component { token: this.state.sessionToken }); }); */ - AppDispatcher.dispatch({ - type: 'dashboards/start-load', - data: this.props.match.params.dashboard, - token: this.state.sessionToken - }); AppDispatcher.dispatch({ type: 'widgets/start-load',