From 22a8c925c6300a06f0f31d2618f9550e94364752 Mon Sep 17 00:00:00 2001
From: Kamal Balayev <55696660+kamalbalayev@users.noreply.github.com>
Date: Sun, 12 Nov 2023 15:02:14 +0400
Subject: [PATCH] If there is no parent node, set "true" which appears after
 the filter

---
 src/components/Tree/Tree.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/Tree/Tree.js b/src/components/Tree/Tree.js
index 00631ae..811b3e4 100644
--- a/src/components/Tree/Tree.js
+++ b/src/components/Tree/Tree.js
@@ -172,10 +172,10 @@ export default {
     filter (keyWord) {
       this.hasSearchResult = false
       const walk = (node = this.root) => {
-        const { children } = node
+        const { parent, children } = node
         children && children.forEach(child => {
           if (!keyWord) {
-            Object.assign(child.data, { visible: true })
+            Object.assign(child.data, { visible: !parent })
             walk(child)
             return
           }