diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/relationshipsModal.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/relationshipsModal.svelte index 843644ccb..ed42e78a2 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/relationshipsModal.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/relationshipsModal.svelte @@ -23,7 +23,11 @@ selectedRelationship = null; } - $: tableColumns = [{ id: '$id', width: 200 }, ...args.map((id) => ({ id }))]; + $: tableColumns = [ + // take full width if no display names set + { id: '$id', width: args.length ? 200 : undefined }, + ...args.map((id) => ({ id })) + ]; @@ -33,7 +37,7 @@ Document ID - {#if args?.length} + {#if args.length} {#each args as arg} {arg} {/each} @@ -47,7 +51,7 @@ {doc.$id} - {#if args?.length} + {#if args.length} {#each args as arg} {doc[arg]} {/each} diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/settings/displayName.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/settings/displayName.svelte index 46b972b03..e4d909525 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/settings/displayName.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/settings/displayName.svelte @@ -73,7 +73,9 @@ (names?.length && !last(names)) ); - const hasExhaustedOptions = $derived(getValidAttributes().length === names?.length); + const hasExhaustedOptions = $derived( + getValidAttributes().length === names.filter(Boolean).length + );