Improve grid datasource backwards compatibility

This commit is contained in:
Andrew Kingston 2023-10-20 11:14:24 +01:00
parent 7fd7943a5a
commit fa90629139
2 changed files with 5 additions and 6 deletions

View File

@ -5560,7 +5560,8 @@
{
"type": "dataSource",
"label": "Data",
"key": "datasource"
"key": "table",
"required": true
},
{
"type": "columns/grid",

View File

@ -4,7 +4,8 @@
import { getContext } from "svelte"
import { Grid } from "@budibase/frontend-core"
export let datasource
// table is actually any datasource, but called table for legacy compatibility
export let table
export let allowAddRows = true
export let allowEditRows = true
export let allowDeleteRows = true
@ -16,9 +17,6 @@
export let columns = null
export let onRowClick = null
// Legacy settings
export let table
const component = getContext("component")
const { styleable, API, builderStore, notificationStore } = getContext("sdk")
@ -42,7 +40,7 @@
class:in-builder={$builderStore.inBuilder}
>
<Grid
datasource={datasource || table}
datasource={table}
{API}
{stripeRows}
{initialFilter}