mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix display of thumbnail with tabular layout in File Library (#19483)
* Fix display of thumbnail with tabular layout in File Library * Add changeset * Update comment Co-authored-by: Daniel Biegler <DanielBiegler@users.noreply.github.com> --------- Co-authored-by: Daniel Biegler <DanielBiegler@users.noreply.github.com>
This commit is contained in:
5
.changeset/serious-pants-melt.md
Normal file
5
.changeset/serious-pants-melt.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@directus/app": patch
|
||||
---
|
||||
|
||||
Fixed display of thumbnail using tabular layout in File Library
|
||||
@@ -111,11 +111,13 @@ export function useAliasFields(
|
||||
function getFromAliasedItem<K, T extends Record<string, K>>(item: T, key: string): K | undefined {
|
||||
const aliasInfo = Object.values(aliasedFields.value).find((field) => field.key === key);
|
||||
|
||||
// Skip any fields prefixed with $ as they dont exist. ($thumbnail as an example)
|
||||
key = key
|
||||
.split('.')
|
||||
.filter((k) => !k.startsWith('$'))
|
||||
.join('.');
|
||||
// Skip any nested fields prefixed with $ as they dont exist. ($thumbnail as an example)
|
||||
key = key.includes('.')
|
||||
? key
|
||||
.split('.')
|
||||
.filter((k) => !k.startsWith('$'))
|
||||
.join('.')
|
||||
: key;
|
||||
|
||||
if (!aliasInfo || !aliasInfo.aliased) return get(item, key);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user