datasourceType setup

This commit is contained in:
Adria Navarro 2023-07-18 18:32:31 +02:00
parent 5bd491b0a8
commit 95faeea286
4 changed files with 6 additions and 1 deletions

View File

@ -44,6 +44,7 @@
<Grid
{API}
tableId={id}
datasourceType="table"
allowAddRows={!isUsersTable}
allowDeleteRows={!isUsersTable}
schemaOverrides={isUsersTable ? userSchemaOverrides : null}

View File

@ -39,6 +39,7 @@
>
<Grid
tableId={table?.tableId}
datasourceType="table"
{API}
{allowAddRows}
{allowEditRows}

View File

@ -29,6 +29,7 @@
export let API = null
export let tableId = null
export let datasourceType = null
export let schemaOverrides = null
export let columnWhitelist = null
export let allowAddRows = true
@ -77,6 +78,7 @@
// Keep config store up to date with props
$: config.set({
tableId,
datasourceType,
schemaOverrides,
columnWhitelist,
allowAddRows,

View File

@ -60,6 +60,7 @@ export const deriveStores = context => {
loading,
sort,
tableId,
datasourceType,
API,
scroll,
validation,
@ -111,7 +112,7 @@ export const deriveStores = context => {
const newFetch = fetchData({
API,
datasource: {
type: "table",
type: datasourceType,
tableId: $tableId,
},
options: {