mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-23 14:06:00 +03:00
Sorting fix (#725)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
4673bbfa6d
commit
11266c080e
@ -36,7 +36,7 @@ export async function getObjectPresenter (client: Client, _class: Ref<Class<Obj>
|
||||
}
|
||||
}
|
||||
const presenter = await getResource(presenterMixin.presenter)
|
||||
const key = typeof preserveKey === 'string' ? preserveKey : ''
|
||||
const key = preserveKey.sortingKey ?? preserveKey.key
|
||||
const sortingKey = clazz.sortingKey ?
|
||||
(key.length > 0 ? key + '.' + clazz.sortingKey : clazz.sortingKey)
|
||||
: key
|
||||
@ -64,7 +64,7 @@ async function getAttributePresenter (client: Client, _class: Ref<Class<Obj>>, k
|
||||
if (presenterMixin.presenter === undefined) {
|
||||
throw new Error('attribute presenter not found for ' + JSON.stringify(preserveKey))
|
||||
}
|
||||
const resultKey = typeof preserveKey === 'string' ? preserveKey : ''
|
||||
const resultKey = preserveKey.sortingKey ?? preserveKey.key
|
||||
const sortingKey = attribute.type._class === core.class.ArrOf ? resultKey + '.length' : resultKey
|
||||
const presenter = await getResource(presenterMixin.presenter)
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user