Remove highlight when deselecting node despite hover status.
This commit is contained in:
parent
f89e62b9e1
commit
6129bdad3e
@ -15,8 +15,9 @@ const OrgAst = (props: {
|
||||
|
||||
function selectNode(uid: string, start: number, end: number) {
|
||||
if (selectedNode !== null && selectedNode.uid === uid) {
|
||||
props.setHighlight([hoveredNode].filter((node) => node !== null));
|
||||
props.setHighlight([]);
|
||||
setSelectedNode(null);
|
||||
setHoveredNode(null);
|
||||
} else {
|
||||
const new_node: OrgNodeReference = { uid: uid, start: start, end: end };
|
||||
props.setHighlight(
|
||||
|
Loading…
Reference in New Issue
Block a user