Browse Source

fix node highlight

AykutSarac 2 years ago
parent
commit
452bb87c2e
2 changed files with 1 additions and 4 deletions
  1. 1 2
      src/components/CustomNode/styles.tsx
  2. 0 2
      src/utils/search.ts

+ 1 - 2
src/components/CustomNode/styles.tsx

@@ -70,8 +70,7 @@ export const StyledKey = styled.span<{
   font-size: ${({ parent }) => parent && "14px"};
   overflow: hidden;
   text-overflow: ellipsis;
-  padding: ${({ parent }) => parent && "7px"};
-  height: 18px;
+  padding: 7px;
 `;
 
 export const StyledRow = styled.span.attrs<{

+ 0 - 2
src/utils/search.ts

@@ -16,8 +16,6 @@ export const highlightMatchedNodes = (
   selectedNode: number
 ) => {
   nodes?.forEach(node => {
-    console.log(node.parentElement?.closest("foreignObject"));
-
     node.parentElement?.closest("foreignObject")?.classList.add("searched");
   });