Improve grid datasource backwards compatibility
This commit is contained in:
parent
7fd7943a5a
commit
fa90629139
|
@ -5560,7 +5560,8 @@
|
|||
{
|
||||
"type": "dataSource",
|
||||
"label": "Data",
|
||||
"key": "datasource"
|
||||
"key": "table",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "columns/grid",
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue