refactor(dev-only): allow sorting files table view by file size
This commit is contained in:
@@ -7,6 +7,7 @@ export interface SortableItem {
|
|||||||
userModifiedDate: Date
|
userModifiedDate: Date
|
||||||
title?: string
|
title?: string
|
||||||
pinned: boolean
|
pinned: boolean
|
||||||
|
decryptedSize?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export const CollectionSort: Record<string, keyof SortableItem> = {
|
export const CollectionSort: Record<string, keyof SortableItem> = {
|
||||||
|
|||||||
@@ -235,6 +235,7 @@ const FilesTableView = ({ application, filesController, featuresController, link
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Size',
|
name: 'Size',
|
||||||
|
sortBy: 'decryptedSize',
|
||||||
cell: (file) => {
|
cell: (file) => {
|
||||||
return formatSizeToReadableString(file.decryptedSize)
|
return formatSizeToReadableString(file.decryptedSize)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user