Skip to content

Commit 42335c9

Browse files
committed
Sort on supported status.
1 parent 3c0b3e4 commit 42335c9

File tree

1 file changed

+8
-1
lines changed
  • extensions/ql-vscode/src/data-extensions-editor

1 file changed

+8
-1
lines changed

extensions/ql-vscode/src/data-extensions-editor/bqrs.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ export function decodeBqrsToExternalApiUsages(
4747

4848
const externalApiUsages = Array.from(methodsByApiName.values());
4949
externalApiUsages.sort((a, b) => {
50-
// Sort by number of usages descending
50+
// Sort first by supported, putting unmodeled methods first.
51+
if (a.supported && !b.supported) {
52+
return 1;
53+
}
54+
if (!a.supported && b.supported) {
55+
return -1;
56+
}
57+
// Then sort by number of usages descending
5158
return b.usages.length - a.usages.length;
5259
});
5360
return externalApiUsages;

0 commit comments

Comments
 (0)