Skip to content

Commit 7a3c040

Browse files
committed
patch: stuff.
1 parent eedbe51 commit 7a3c040

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/relationshipsModal.svelte

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
selectedRelationship = null;
2424
}
2525
26-
$: tableColumns = [{ id: '$id', width: 200 }, ...args.map((id) => ({ id }))];
26+
$: tableColumns = [
27+
// take full width if no display names set
28+
{ id: '$id', width: args.length ? 200 : undefined },
29+
...args.map((id) => ({ id }))
30+
];
2731
</script>
2832

2933
<Modal bind:show title={selectedRelationship?.key} hideFooter>
@@ -33,7 +37,7 @@
3337
<Table.Root let:root columns={tableColumns}>
3438
<svelte:fragment slot="header" let:root>
3539
<Table.Header.Cell column="$id" {root}>Document ID</Table.Header.Cell>
36-
{#if args?.length}
40+
{#if args.length}
3741
{#each args as arg}
3842
<Table.Header.Cell column={arg} {root}>{arg}</Table.Header.Cell>
3943
{/each}
@@ -47,7 +51,7 @@
4751
<Table.Cell column="$id" {root}>
4852
<Id value={doc.$id}>{doc.$id}</Id>
4953
</Table.Cell>
50-
{#if args?.length}
54+
{#if args.length}
5155
{#each args as arg}
5256
<Table.Cell column={arg} {root}>{doc[arg]}</Table.Cell>
5357
{/each}

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/settings/displayName.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@
7373
(names?.length && !last(names))
7474
);
7575
76-
const hasExhaustedOptions = $derived(getValidAttributes().length === names?.length);
76+
const hasExhaustedOptions = $derived(
77+
getValidAttributes().length === names.filter(Boolean).length
78+
);
7779
</script>
7880

7981
<Form onSubmit={updateDisplayName}>

0 commit comments

Comments
 (0)