Revert tableType flag and derive from table instead

This commit is contained in:
Andrew Kingston 2023-06-07 10:48:08 +01:00
parent f9f51f9ecf
commit 61a143628b
4 changed files with 3 additions and 5 deletions

View File

@ -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}

View File

@ -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}
/> />

View File

@ -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

View File

@ -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() }