Browse Source

enhance: new selected node should be put on top of the nodes panel (#674)

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 8 months ago
parent
commit
aa940ce68b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/src/pages/databases/collections/search/DataExplorer.tsx

+ 1 - 1
client/src/pages/databases/collections/search/DataExplorer.tsx

@@ -233,7 +233,7 @@ const DataExplorer = ({
             node => node.id !== d.id
           );
         } else {
-          selectedNodesRef.current = [...selectedNodesRef.current, d];
+          selectedNodesRef.current = [d, ...selectedNodesRef.current];
         }
 
         // Add circle around the selected node and remove it when unselected