Skip to content

Commit

Permalink
fix: removed highlight when moved from node in outline
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul-ku-Mo authored and surajair committed Nov 3, 2024
1 parent eb167e3 commit fe18a88
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Node = memo(({ node, style, dragHandle }: NodeRendererProps<any>) => {

let previousState: boolean | null = null;
const hasChildren = node.children.length > 0;
const { highlightBlock } = useBlockHighlight();
const { highlightBlock, clearHighlight } = useBlockHighlight();
const { id, data, isSelected, willReceiveDrop, isDragging, isEditing, handleClick } = node;

const handleToggle = (event: any) => {
Expand Down Expand Up @@ -165,6 +165,7 @@ const Node = memo(({ node, style, dragHandle }: NodeRendererProps<any>) => {
<BlockContextMenu id={id}>
<div
onMouseEnter={() => highlightBlock(id)}
onMouseLeave={() => clearHighlight()}
onClick={handleNodeClickWithoutPropagating}
style={style}
data-node-id={id}
Expand Down

0 comments on commit fe18a88

Please sign in to comment.