Skip to content

Commit

Permalink
feat: docs are sorted alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
zleyyij committed Aug 8, 2024
1 parent 8fc0053 commit c4f9edd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/lib/components/FileNavigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
export let name = '';
export let children: INode[] = [];
export let children: INode[];
export let indent = 1;
export let path = name;
let selected = false;
Expand All @@ -20,6 +20,10 @@
let showNewFileInput = false;
let newFileInput: HTMLInputElement;
// Sort nodes alphabetically
// https://stackoverflow.com/questions/8900732/sort-objects-in-an-array-alphabetically-on-one-property-of-the-array
children = children.sort((a, b) => a.name.localeCompare(b.name))
const dispatch = createEventDispatcher();
function fileClickHandler() {
Expand Down

0 comments on commit c4f9edd

Please sign in to comment.