Skip to content

Commit

Permalink
Fix first selecting an inner block SidebarPortal
Browse files Browse the repository at this point in the history
  • Loading branch information
avoinea committed Mar 30, 2021
1 parent 5d23d46 commit 77ae916
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/manage/Blocks/Group/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const Edit = (props) => {
selectedBlock={selected ? selectedBlock : null}
allowedBlocks={data.allowedBlocks}
title={data.placeholder}
description={data?.instructions?.data}
description={instructions}
onSelectBlock={(id) => {
setSelectedBlock(id);
}}
Expand Down Expand Up @@ -184,7 +184,7 @@ const Edit = (props) => {
<Button
icon
basic
title="Help"
title="Section help"
onClick={() => {
setSelectedBlock();
const tab = manage ? 0 : 1;
Expand All @@ -204,7 +204,7 @@ const Edit = (props) => {
</BlocksForm>

{counterComponent}
<SidebarPortal selected={selected}>
<SidebarPortal selected={selected && !selectedBlock}>
{instructions && (
<Segment attached>
<div dangerouslySetInnerHTML={{ __html: instructions }} />
Expand Down

0 comments on commit 77ae916

Please sign in to comment.