Numeric sorting and filter. "New Folder 12" > "New Folder 2"
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user