Numeric sorting and filter. "New Folder 12" > "New Folder 2"

This commit is contained in:
Leo Vasanko
2023-11-04 01:27:09 +00:00
parent 115bb5db59
commit 997e0b8549
62 changed files with 64 additions and 63 deletions

View File

@@ -180,7 +180,7 @@ const toggleSort = (name: string) => {
}
const sort = ref<string>('')
const sortCompare = {
name: (a: Document, b: Document) => a.name.localeCompare(b.name),
name: (a: Document, b: Document) => a.name.localeCompare(b.name, undefined, {numeric: true, sensitivity: 'base'}),
modified: (a: FolderDocument, b: FolderDocument) => b.mtime - a.mtime,
size: (a: FolderDocument, b: FolderDocument) => b.size - a.size
}