From 94714ecf9e73b10a1a2b6752e16d4be27e3c3653 Mon Sep 17 00:00:00 2001 From: Gandharv Date: Wed, 19 Oct 2022 09:29:04 +0700 Subject: [PATCH] fix: disable multiple selection of components while comments feature is toggled on (#4470) * fix: disable multiple selection of components while comments feature is toggled on * fix: add nullish collesion check --- frontend/src/Editor/Editor.jsx | 38 ++++++++++++++++-------------- frontend/src/_ui/Mentions/index.js | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/frontend/src/Editor/Editor.jsx b/frontend/src/Editor/Editor.jsx index f1f33e5bd4..36407f813c 100644 --- a/frontend/src/Editor/Editor.jsx +++ b/frontend/src/Editor/Editor.jsx @@ -1337,24 +1337,26 @@ class EditorComponent extends React.Component { isSaving={this.state.isSaving} isUnsavedQueriesAvailable={this.state.isUnsavedQueriesAvailable} /> - { - this.canvasContainerRef.current.scrollBy(e.direction[0] * 10, e.direction[1] * 10); - }} - > + {!showComments && ( + { + this.canvasContainerRef.current.scrollBy(e.direction[0] * 10, e.direction[1] * 10); + }} + > + )}
- {suggestion.first_name.slice(0, 1) + suggestion.last_name.slice(0, 1)} + {suggestion?.first_name.slice(0, 1) + suggestion?.last_name.slice(0, 1)}