mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
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
This commit is contained in:
parent
6309dddae3
commit
94714ecf9e
2 changed files with 21 additions and 19 deletions
|
|
@ -1337,24 +1337,26 @@ class EditorComponent extends React.Component {
|
|||
isSaving={this.state.isSaving}
|
||||
isUnsavedQueriesAvailable={this.state.isUnsavedQueriesAvailable}
|
||||
/>
|
||||
<Selecto
|
||||
dragContainer={'.canvas-container'}
|
||||
selectableTargets={['.react-draggable']}
|
||||
hitRate={0}
|
||||
selectByClick={true}
|
||||
toggleContinueSelect={['shift']}
|
||||
ref={this.selectionRef}
|
||||
scrollOptions={this.state.scrollOptions}
|
||||
onSelectStart={this.onAreaSelectionStart}
|
||||
onSelectEnd={this.onAreaSelectionEnd}
|
||||
onSelect={this.onAreaSelection}
|
||||
onDragStart={this.onAreaSelectionDragStart}
|
||||
onDrag={this.onAreaSelectionDrag}
|
||||
onDragEnd={this.onAreaSelectionDragEnd}
|
||||
onScroll={(e) => {
|
||||
this.canvasContainerRef.current.scrollBy(e.direction[0] * 10, e.direction[1] * 10);
|
||||
}}
|
||||
></Selecto>
|
||||
{!showComments && (
|
||||
<Selecto
|
||||
dragContainer={'.canvas-container'}
|
||||
selectableTargets={['.react-draggable']}
|
||||
hitRate={0}
|
||||
selectByClick={true}
|
||||
toggleContinueSelect={['shift']}
|
||||
ref={this.selectionRef}
|
||||
scrollOptions={this.state.scrollOptions}
|
||||
onSelectStart={this.onAreaSelectionStart}
|
||||
onSelectEnd={this.onAreaSelectionEnd}
|
||||
onSelect={this.onAreaSelection}
|
||||
onDragStart={this.onAreaSelectionDragStart}
|
||||
onDrag={this.onAreaSelectionDrag}
|
||||
onDragEnd={this.onAreaSelectionDragEnd}
|
||||
onScroll={(e) => {
|
||||
this.canvasContainerRef.current.scrollBy(e.direction[0] * 10, e.direction[1] * 10);
|
||||
}}
|
||||
></Selecto>
|
||||
)}
|
||||
<div className="main main-editor-canvas" id="main-editor-canvas">
|
||||
<div
|
||||
className={`canvas-container align-items-center ${!showLeftSidebar && 'hide-sidebar'}`}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ const Mentions = ({ searchUser, value = '', setValue, setMentionedUsers, placeho
|
|||
textTransform: 'uppercase',
|
||||
}}
|
||||
>
|
||||
{suggestion.first_name.slice(0, 1) + suggestion.last_name.slice(0, 1)}
|
||||
{suggestion?.first_name.slice(0, 1) + suggestion?.last_name.slice(0, 1)}
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
|
|
|
|||
Loading…
Reference in a new issue