mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
UBERF-7007 Show folders first in drive (#5645)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
95f26f4978
commit
2c89008374
@ -23,6 +23,7 @@ import core, {
|
||||
AccountRole,
|
||||
IndexKind,
|
||||
Ref,
|
||||
SortingOrder,
|
||||
DOMAIN_MODEL
|
||||
} from '@hcengineering/core'
|
||||
import { type Drive, type File, type Folder, type Resource, driveId } from '@hcengineering/drive'
|
||||
@ -259,18 +260,25 @@ function defineResource (builder: Builder): void {
|
||||
{
|
||||
key: '',
|
||||
presenter: drive.component.ResourcePresenter,
|
||||
label: drive.string.Name
|
||||
label: drive.string.Name,
|
||||
sortingKey: 'name'
|
||||
},
|
||||
{
|
||||
key: '$lookup.file.size',
|
||||
presenter: drive.component.FileSizePresenter,
|
||||
label: drive.string.Size
|
||||
label: drive.string.Size,
|
||||
sortingKey: '$lookup.file.size'
|
||||
},
|
||||
{
|
||||
key: '$lookup.file.modifiedOn'
|
||||
},
|
||||
'createdBy'
|
||||
],
|
||||
options: {
|
||||
sort: {
|
||||
_class: SortingOrder.Descending
|
||||
}
|
||||
},
|
||||
configOptions: {
|
||||
hiddenKeys: ['name', 'file', 'parent', 'path'],
|
||||
sortable: true
|
||||
|
@ -139,7 +139,7 @@
|
||||
objectsRecieved = true
|
||||
loading = 0
|
||||
},
|
||||
{ sort: getSort(sortKey), limit, ...options, lookup, total: false }
|
||||
{ limit, ...options, sort: getSort(sortKey), lookup, total: false }
|
||||
)
|
||||
? 1
|
||||
: 0
|
||||
@ -155,7 +155,7 @@
|
||||
(result) => {
|
||||
total = result.total
|
||||
},
|
||||
{ sort: getSort(_sortKey), limit: 1, ...options, lookup, total: true }
|
||||
{ limit: 1, ...options, sort: getSort(_sortKey), lookup, total: true }
|
||||
)
|
||||
|
||||
const showContextMenu = async (ev: MouseEvent, object: Doc, row: number): Promise<void> => {
|
||||
|
Loading…
Reference in New Issue
Block a user