From a2b19934e80f340fe11d00c187b43dde6ea35382 Mon Sep 17 00:00:00 2001 From: Arpit Date: Thu, 20 Jan 2022 13:43:27 +0530 Subject: [PATCH] [Hotfix]: Adds current user's groups the inspector in the editor (#1875) * adding groups which lists all the groups the current user belongs in globals [inspector(leftsidebar))] * adds a check for possibility exists for a missing ref --- frontend/src/Editor/Editor.jsx | 1 + frontend/src/Editor/LeftSidebar/SidebarInspector.jsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/Editor/Editor.jsx b/frontend/src/Editor/Editor.jsx index 1010e8cd9a..159c58ab52 100644 --- a/frontend/src/Editor/Editor.jsx +++ b/frontend/src/Editor/Editor.jsx @@ -54,6 +54,7 @@ class Editor extends React.Component { email: currentUser.email, firstName: currentUser.first_name, lastName: currentUser.last_name, + groups: currentUser?.group_permissions.map((group) => group.group), }; } diff --git a/frontend/src/Editor/LeftSidebar/SidebarInspector.jsx b/frontend/src/Editor/LeftSidebar/SidebarInspector.jsx index 15145439ff..bad0a99520 100644 --- a/frontend/src/Editor/LeftSidebar/SidebarInspector.jsx +++ b/frontend/src/Editor/LeftSidebar/SidebarInspector.jsx @@ -63,7 +63,7 @@ export const LeftSidebarInspector = ({ darkMode, globals, components, queries }) collapsed={true} displayObjectSize={false} quotesOnKeys={false} - sortKeys={true} + sortKeys={false} // indentWidth={1} />