Fix table selection not working when on datasource page
This commit is contained in:
parent
140729b1d7
commit
ffd3e5d008
|
@ -13,6 +13,13 @@
|
||||||
$: sortedTables = $tables.list
|
$: sortedTables = $tables.list
|
||||||
.filter(table => table.sourceId === sourceId)
|
.filter(table => table.sourceId === sourceId)
|
||||||
.sort(alphabetical)
|
.sort(alphabetical)
|
||||||
|
|
||||||
|
const selectTable = tableId => {
|
||||||
|
tables.select(tableId)
|
||||||
|
if (!$isActive("./table/:tableId")) {
|
||||||
|
$goto(`./table/${tableId}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $database?._id}
|
{#if $database?._id}
|
||||||
|
@ -25,7 +32,7 @@
|
||||||
text={table.name}
|
text={table.name}
|
||||||
selected={$isActive("./table/:tableId") &&
|
selected={$isActive("./table/:tableId") &&
|
||||||
$tables.selected?._id === table._id}
|
$tables.selected?._id === table._id}
|
||||||
on:click={() => tables.select(table._id)}
|
on:click={() => selectTable(table._id)}
|
||||||
>
|
>
|
||||||
{#if table._id !== TableNames.USERS}
|
{#if table._id !== TableNames.USERS}
|
||||||
<EditTablePopover {table} />
|
<EditTablePopover {table} />
|
||||||
|
|
Loading…
Reference in New Issue