From 8cdacc567ca23763a50b753cd6bcd578fa9644c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Maneiro?= <583546+oandregal@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:18:28 +0100 Subject: [PATCH] Test case for combining combined fields --- .../src/components/dataviews/stories/fixtures.tsx | 1 + .../src/components/dataviews/stories/index.story.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/dataviews/src/components/dataviews/stories/fixtures.tsx b/packages/dataviews/src/components/dataviews/stories/fixtures.tsx index ff098209b34684..6c74c516853c5b 100644 --- a/packages/dataviews/src/components/dataviews/stories/fixtures.tsx +++ b/packages/dataviews/src/components/dataviews/stories/fixtures.tsx @@ -558,6 +558,7 @@ export const themeFields: Field< Theme >[] = [ }, { id: 'requires', label: 'Requires at least' }, { id: 'tested', label: 'Tested up to' }, + { id: 'icon', label: 'Icon', render: () => }, { id: 'tags', label: 'Tags', diff --git a/packages/dataviews/src/components/dataviews/stories/index.story.tsx b/packages/dataviews/src/components/dataviews/stories/index.story.tsx index 878677d2eb30c6..bf65df2c9cbbdc 100644 --- a/packages/dataviews/src/components/dataviews/stories/index.story.tsx +++ b/packages/dataviews/src/components/dataviews/stories/index.story.tsx @@ -141,11 +141,17 @@ export const CombinedFields = () => { layout: { primaryField: 'name', combinedFields: [ + { + id: 'name_tested', + label: 'Theme', // This is not used, but is required for TS. + children: [ 'name', 'tested' ], + direction: 'vertical', + }, { id: 'theme', label: 'Theme', - children: [ 'name', 'description' ], - direction: 'vertical', + children: [ 'icon', 'name_tested' ], + direction: 'horizontal', }, ] as CombinedField[], styles: {