guoqqqi commented on code in PR #2585:
URL: https://github.com/apache/apisix-dashboard/pull/2585#discussion_r947373507


##########
web/src/components/Plugin/PluginPage.tsx:
##########
@@ -96,23 +97,32 @@ const PluginPage: React.FC<Props> = ({
       form.setFieldsValue({ plugin_config_id });
     });
   }, []);
+
+  useEffect(() => {
+    const openList = pluginList.filter(
+      (item) => initialData[item.name] && !initialData[item.name].disable,
+    );
+    setEnablePluginsList(openList);
+  }, [initialData]);
+
   const openPluginList = pluginList.filter(
     (item) => initialData[item.name] && !initialData[item.name].disable,
   );
+
   const openPluginType = openPluginList.map((item) => item.type);
   const newOpenPluginType = openPluginType.filter((elem, index, self) => {
     return index === self.indexOf(elem);
   });
 
-  const [showEnablePlugin, setShowEnablePlugin] = useState<boolean>(true);
+  const [showEnablePlugin, setShowEnablePlugin] = useState<boolean>(false);

Review Comment:
   ```suggestion
     const [showEnablePlugin, setShowEnablePlugin] = useState(false);
   ```
   move this line to 71



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to