mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
address comment.
This commit is contained in:
1 parent
df5f5d65d2
commit
153df8193e
2 files changed
+11
-7
No files matched your search
+1
-3
@@ -41,9 +41,7 @@
|
||||
tables: []
|
||||
});
|
||||
|
||||
const sortedTables = $derived.by(() =>
|
||||
tables?.tables?.slice().sort((a, b) => a.name.localeCompare(b.name))
|
||||
);
|
||||
const sortedTables = $derived.by(() => tables?.tables);
|
||||
|
||||
const selectedTable = $derived.by(() =>
|
||||
sortedTables?.find((table: Models.Table) => table.$id === tableId)
|
||||
|
||||
+10
-4
@@ -342,10 +342,16 @@
|
||||
<Skeleton variant="line" height={40} width="auto" />
|
||||
</div>
|
||||
{:else if relatedTable?.columns?.length && fetchedRows.length}
|
||||
{@const twoWayColumnKey = relatedTable.columns.find(
|
||||
(col: Models.ColumnRelationship) => col.twoWay
|
||||
)?.key}
|
||||
{@const columnsToRender = relatedTable.columns.filter((col) => col.key !== twoWayColumnKey)}
|
||||
<!-- we should not show current table column items in this view -->
|
||||
{@const twoWayKeys = new Set(
|
||||
relatedTable
|
||||
.columns
|
||||
.filter((column: Models.ColumnRelationship) => column.twoWay)
|
||||
.map((c) => c.key)
|
||||
)}
|
||||
|
||||
<!-- render the filtered ones -->
|
||||
{@const columnsToRender = relatedTable.columns.filter((c) => !twoWayKeys.has(c.key))}
|
||||
|
||||
<div bind:this={columnFormWrapper}>
|
||||
{#if fetchedRows.length === 1}
|
||||
|
||||
Reference in new issue
Block a user