dengliming opened a new issue, #631: URL: https://github.com/apache/shenyu-dashboard/issues/631
## Description `updateTree` flattens `treeData` as root nodes plus their direct children only. An API under a sub-tag (root tag → child tag → API, the normal layout) sits at depth 3, so `curNodeIdx === -1` and the function returns early without calling `afterUpdate`. The subsequent `setTreeData(); setTreeData(treeData)` mutates `treeData` in place and relies on two renders to force an update, which briefly flashes the Empty placeholder. ## Location (Lines refer to `master @ 83969a5`.) - `src/routes/Document/components/SearchApi.js:245-272` ## Impact Editing an API nested more than one level deep saves successfully but neither the tree title nor the right-hand ApiInfo pane reflects the change until a full reload. ## Suggested fix Walk the tree recursively (or keep a flat id→node map) and produce a new tree object immutably before calling `setTreeData`. ## Related existing None -- 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]
