From 5d4b5dc7a94dd0e64f6070f4ebd5ad98439a753e Mon Sep 17 00:00:00 2001 From: nadeem <33570546+nadeem-akhtar-nu@users.noreply.github.com> Date: Sun, 2 Feb 2020 23:13:39 +0300 Subject: [PATCH] Performance improvement Admin.PersonaBar pages treeview on Collapse/Expand node (#3533) --- .../src/PersonaBarPageTreeviewInteractor.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dnn.AdminExperience/ClientSide/Pages.Web/src/components/dnn-persona-bar-page-treeview/src/PersonaBarPageTreeviewInteractor.jsx b/Dnn.AdminExperience/ClientSide/Pages.Web/src/components/dnn-persona-bar-page-treeview/src/PersonaBarPageTreeviewInteractor.jsx index 51032ace819..0dd89304da5 100644 --- a/Dnn.AdminExperience/ClientSide/Pages.Web/src/components/dnn-persona-bar-page-treeview/src/PersonaBarPageTreeviewInteractor.jsx +++ b/Dnn.AdminExperience/ClientSide/Pages.Web/src/components/dnn-persona-bar-page-treeview/src/PersonaBarPageTreeviewInteractor.jsx @@ -124,12 +124,14 @@ class PersonaBarPageTreeviewInteractor extends Component { initialCollapse: false }); let listPageItems = undefined; + let updateReduxStore = null; this.props._traverse((item, listItem, updateStore) => { (item.id === id) ? item.isOpen = !item.isOpen : null; - updateStore(listItem); + updateReduxStore = updateStore; listPageItems = listItem; }); + updateReduxStore ? updateReduxStore(listPageItems) : null; this._countTreeOpenDeepParent(listPageItems); }