From 0a5ff6d12a77deb5cdc2d740cc9d643ee44c692e Mon Sep 17 00:00:00 2001 From: Andreas Bernhard Date: Mon, 3 Oct 2022 16:11:57 +0200 Subject: [PATCH] fix (display-filesize): wrap component value in `span` node (#15841) * fix (display-filesize): wrap component value in `span` node rel: https://github.com/directus/directus/issues/15838 * reformatting (display-filesize): ran prettier on file --- app/src/displays/filesize/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/displays/filesize/index.ts b/app/src/displays/filesize/index.ts index 22b8b9c342..e491a6e712 100644 --- a/app/src/displays/filesize/index.ts +++ b/app/src/displays/filesize/index.ts @@ -1,12 +1,13 @@ import { defineDisplay } from '@directus/shared/utils'; import { formatFilesize } from '@/utils/format-filesize'; +import { h } from 'vue'; export default defineDisplay({ id: 'filesize', name: '$t:displays.filesize.filesize', description: '$t:displays.filesize.description', icon: 'description', - component: ({ value }: { value: number }) => formatFilesize(value), + component: ({ value }: { value: number }) => h('span', null, formatFilesize(value)), handler: ({ value }: { value: number }) => formatFilesize(value), options: [], types: ['integer', 'bigInteger'],