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