Revert tableType flag and derive from table instead
This commit is contained in:
parent
f9f51f9ecf
commit
61a143628b
|
@ -32,7 +32,6 @@
|
||||||
<Grid
|
<Grid
|
||||||
{API}
|
{API}
|
||||||
tableId={id}
|
tableId={id}
|
||||||
tableType={$tables.selected?.type}
|
|
||||||
allowAddRows={!isUsersTable}
|
allowAddRows={!isUsersTable}
|
||||||
allowDeleteRows={!isUsersTable}
|
allowDeleteRows={!isUsersTable}
|
||||||
schemaOverrides={isUsersTable ? userSchemaOverrides : null}
|
schemaOverrides={isUsersTable ? userSchemaOverrides : null}
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
|
|
||||||
export let disabled = false
|
export let disabled = false
|
||||||
|
|
||||||
const { rows, tableId, tableType } = getContext("grid")
|
const { rows, tableId, table } = getContext("grid")
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ImportButton
|
<ImportButton
|
||||||
{disabled}
|
{disabled}
|
||||||
tableId={$tableId}
|
tableId={$tableId}
|
||||||
{tableType}
|
tableType={$table?.type}
|
||||||
on:importrows={rows.actions.refreshData}
|
on:importrows={rows.actions.refreshData}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
export let tableId
|
export let tableId
|
||||||
export let tableType
|
export let tableType
|
||||||
|
|
||||||
let rows = []
|
let rows = []
|
||||||
let allValid = false
|
let allValid = false
|
||||||
let displayColumn = null
|
let displayColumn = null
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
|
|
||||||
export let API = null
|
export let API = null
|
||||||
export let tableId = null
|
export let tableId = null
|
||||||
export let tableType = null
|
|
||||||
export let schemaOverrides = null
|
export let schemaOverrides = null
|
||||||
export let allowAddRows = true
|
export let allowAddRows = true
|
||||||
export let allowAddColumns = true
|
export let allowAddColumns = true
|
||||||
|
@ -67,7 +66,6 @@
|
||||||
rand,
|
rand,
|
||||||
config,
|
config,
|
||||||
tableId: tableIdStore,
|
tableId: tableIdStore,
|
||||||
tableType,
|
|
||||||
schemaOverrides: schemaOverridesStore,
|
schemaOverrides: schemaOverridesStore,
|
||||||
}
|
}
|
||||||
context = { ...context, ...createEventManagers() }
|
context = { ...context, ...createEventManagers() }
|
||||||
|
|
Loading…
Reference in New Issue