Преглед на файлове

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

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang преди 10 месеца
родител
ревизия
aa940ce68b
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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