mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 00:01:22 +02:00
Update Sidebar.tsx
This commit is contained in:
@@ -154,7 +154,10 @@ function buildTree(exchanges: HttpExchange[]): TreeNode<SidebarItem> {
|
|||||||
children: [],
|
children: [],
|
||||||
draggable: false,
|
draggable: false,
|
||||||
};
|
};
|
||||||
for (const child of trie.children.values()) {
|
const sortedChildren = [...trie.children.values()].sort((a, b) =>
|
||||||
|
a.label.localeCompare(b.label),
|
||||||
|
);
|
||||||
|
for (const child of sortedChildren) {
|
||||||
node.children?.push(toTreeNode(child, node, depth + 1));
|
node.children?.push(toTreeNode(child, node, depth + 1));
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
|
|||||||
Reference in New Issue
Block a user