From 1fe5082edda6be211aec1edb5bf2a3e7e739628e Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 30 Jul 2024 16:12:13 +0200 Subject: [PATCH] Fall back to page properties if no display fields are specified (#31769) Closes keycloak/keycloak-quickstarts#587 Signed-off-by: Erik Jan de Wit Co-authored-by: Jon Koops --- js/apps/admin-ui/src/page/Page.tsx | 6 ++++-- js/apps/admin-ui/src/page/PageList.tsx | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/js/apps/admin-ui/src/page/Page.tsx b/js/apps/admin-ui/src/page/Page.tsx index a7970b18dc19..b8ea6cbf0500 100644 --- a/js/apps/admin-ui/src/page/Page.tsx +++ b/js/apps/admin-ui/src/page/Page.tsx @@ -60,8 +60,10 @@ export default function Page() { ({ + ...( + page.metadata.displayFields || + page.properties.slice(0, 3).map((p) => p.name) + ).map((name: string, index: number) => ({ name: `config.${name}[0]`, displayKey: page.properties.find((p) => p.name === name)!.label, cellRenderer: