charle-z commented on code in PR #687:
URL: https://github.com/apache/shenyu-dashboard/pull/687#discussion_r4114309751


##########
src/routes/Document/components/ApiDebug.js:
##########
@@ -144,7 +144,7 @@ const FCForm = forwardRef(({ form, onSubmit }, ref) => {
   }, [apiDetail.httpMethod]);
 
   useEffect(() => {
-    setInitialValue({ url: apiDetail.apiPath });
+    setInitialValue((prev) => ({ ...prev, url: apiDetail.apiPath }));

Review Comment:
   Fixed in `abad7930`. The API path effect now preserves the saved mock ID 
only while `apiDetail.id` is unchanged; switching APIs clears that mutation 
identity before the new mock request completes. I also added a mounted A → B 
regression case that keeps A's mock data stale during the switch and verifies 
Reset does not delete `mock-a`.



-- 
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