Fixing issues discovered by cypress tests.
This commit is contained in:
parent
3d89604680
commit
239c328fe1
|
@ -17,13 +17,14 @@
|
|||
let data = []
|
||||
let loading = false
|
||||
$: isUsersTable = $tables.selected?._id === TableNames.USERS
|
||||
$: title = $tables.selected.name
|
||||
$: schema = $tables.selected.schema
|
||||
$: title = $tables.selected?.name
|
||||
$: schema = $tables.selected?.schema
|
||||
$: tableView = {
|
||||
schema,
|
||||
name: $views.selected?.name,
|
||||
}
|
||||
$: isInternal = $tables.selected.type === "internal"
|
||||
$: type = $tables.selected.type
|
||||
$: isInternal = type === "internal"
|
||||
|
||||
// Fetch rows for specified table
|
||||
$: {
|
||||
|
@ -49,6 +50,7 @@
|
|||
{schema}
|
||||
tableId={$tables.selected?._id}
|
||||
{data}
|
||||
{type}
|
||||
allowEditing={true}
|
||||
bind:hideAutocolumns
|
||||
{loading}
|
||||
|
|
|
@ -6,12 +6,13 @@
|
|||
|
||||
let loading = false
|
||||
let error = false
|
||||
let type = "external"
|
||||
</script>
|
||||
|
||||
{#if error}
|
||||
<div class="errors">{error}</div>
|
||||
{/if}
|
||||
<Table schema={query.schema} {data} {loading} rowCount={5} />
|
||||
<Table schema={query.schema} {data} {loading} {type} rowCount={5} />
|
||||
|
||||
<style>
|
||||
.errors {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
$: linkedTable = $tables.list.find(table => table._id === linkedTableId)
|
||||
$: schema = linkedTable?.schema
|
||||
$: table = $tables.list.find(table => table._id === tableId)
|
||||
$: type = table?.type
|
||||
$: fetchData(tableId, rowId)
|
||||
$: {
|
||||
let rowLabel = row?.[table?.primaryDisplay]
|
||||
|
@ -33,5 +34,5 @@
|
|||
</script>
|
||||
|
||||
{#if row && row._id === rowId}
|
||||
<Table {title} {schema} {data} />
|
||||
<Table {title} {schema} {data} {type} />
|
||||
{/if}
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
import {
|
||||
TableNames,
|
||||
UNEDITABLE_USER_FIELDS,
|
||||
BUDIBASE_INTERNAL_DB,
|
||||
} from "constants"
|
||||
import RoleCell from "./cells/RoleCell.svelte"
|
||||
|
||||
|
@ -24,6 +23,7 @@
|
|||
export let loading = false
|
||||
export let hideAutocolumns
|
||||
export let rowCount
|
||||
export let type
|
||||
|
||||
let selectedRows = []
|
||||
let editableColumn
|
||||
|
@ -32,7 +32,7 @@
|
|||
let editColumnModal
|
||||
let customRenderers = []
|
||||
|
||||
$: isInternal = tableId === BUDIBASE_INTERNAL_DB
|
||||
$: isInternal = type !== "external"
|
||||
$: isUsersTable = tableId === TableNames.USERS
|
||||
$: data && resetSelectedRows()
|
||||
$: editRowComponent = isUsersTable ? CreateEditUser : CreateEditRow
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
let hideAutocolumns = true
|
||||
let data = []
|
||||
let loading = false
|
||||
let type = "internal"
|
||||
|
||||
$: name = view.name
|
||||
|
||||
|
@ -56,6 +57,7 @@
|
|||
tableId={view.tableId}
|
||||
{data}
|
||||
{loading}
|
||||
{type}
|
||||
allowEditing={!view?.calculation}
|
||||
bind:hideAutocolumns
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue