SkyeYoung commented on code in PR #2585:
URL: https://github.com/apache/apisix-dashboard/pull/2585#discussion_r947424307
##########
web/src/components/Plugin/PluginPage.tsx:
##########
@@ -96,6 +98,14 @@ 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,
);
Review Comment:
Could you help us improve this section, please? Like you've done here?
https://github.com/Morakes/apisix-dashboard/blob/2877db87a5c3d8af1e187f012c406bd38f27f24a/web/src/components/Plugin/PluginPage.tsx#L102-L107
--
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]