From d635a3441a4d4297af71eb7ca3bc644931092e83 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 15 十月 2024 15:56:13 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/map/header/MapSearch.jsx |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/zy-acs-flow/src/map/header/MapSearch.jsx b/zy-acs-flow/src/map/header/MapSearch.jsx
index 3a866e5..f99ccdf 100644
--- a/zy-acs-flow/src/map/header/MapSearch.jsx
+++ b/zy-acs-flow/src/map/header/MapSearch.jsx
@@ -35,6 +35,7 @@
     const {
         mode,
         setMode,
+        dataFetched,
         curZone,
         setCurSprite,
         setSpriteSettings,
@@ -59,11 +60,10 @@
     };
 
     useEffect(() => {
-        if (!Tool.getMapContainer()) return;
-        setTimeout(() => {
+        if (dataFetched) {
             resetSearch();
-        }, 200);
-    }, [curDeviceType, curZone]);
+        }
+    }, [curDeviceType, dataFetched, curZone]);
 
     useEffect(() => {
         if (!Tool.getMapContainer()) return;
@@ -195,6 +195,7 @@
                 onInputChange={(event, newInputValue) => {
                     setInputValue(newInputValue);
                 }}
+                disableClearable
             />
         </Stack>
     );

--
Gitblit v1.9.1