From 0695e431ea610d4ab8219273039714a752f0e832 Mon Sep 17 00:00:00 2001 From: David Kaltschmidt Date: Tue, 24 Apr 2018 12:07:24 +0200 Subject: [PATCH] Move function calls w/ side-effects to componentDidMount * loadStore() modified the url which triggered a new render path, this gets noticed by react. Moved to componentDidMount. --- public/app/containers/ManageDashboards/FolderPermissions.tsx | 3 +++ public/app/containers/ManageDashboards/FolderSettings.tsx | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/app/containers/ManageDashboards/FolderPermissions.tsx b/public/app/containers/ManageDashboards/FolderPermissions.tsx index ac9dd81216b..abbde63a179 100644 --- a/public/app/containers/ManageDashboards/FolderPermissions.tsx +++ b/public/app/containers/ManageDashboards/FolderPermissions.tsx @@ -16,6 +16,9 @@ export class FolderPermissions extends Component { constructor(props) { super(props); this.handleAddPermission = this.handleAddPermission.bind(this); + } + + componentDidMount() { this.loadStore(); } diff --git a/public/app/containers/ManageDashboards/FolderSettings.tsx b/public/app/containers/ManageDashboards/FolderSettings.tsx index f63b1a74d86..d25a7dc6c06 100644 --- a/public/app/containers/ManageDashboards/FolderSettings.tsx +++ b/public/app/containers/ManageDashboards/FolderSettings.tsx @@ -12,8 +12,7 @@ import appEvents from 'app/core/app_events'; export class FolderSettings extends React.Component { formSnapshot: any; - constructor(props) { - super(props); + componentDidMount() { this.loadStore(); }