Fix table blocks not being able to create rows through V2 views

This commit is contained in:
Andrew Kingston 2023-08-24 16:29:21 +01:00
parent 8269ecf237
commit f7805ef5f9
1 changed files with 3 additions and 3 deletions

View File

@ -45,6 +45,7 @@
let enrichedSearchColumns
let schemaLoaded = false
$: isDSPlus = dataSource?.type === "table" || dataSource?.type === "viewV2"
$: fetchSchema(dataSource)
$: enrichSearchColumns(searchColumns, schema).then(
val => (enrichedSearchColumns = val)
@ -53,8 +54,7 @@
$: editTitle = getEditTitle(detailsFormBlockId, primaryDisplay)
$: normalFields = getNormalFields(schema)
$: rowClickActions =
clickBehaviour === "actions" ||
(dataSource?.type !== "table" && dataSource?.type !== "viewV2")
clickBehaviour === "actions" || !isDSPlus
? onClick
: [
{
@ -76,7 +76,7 @@
},
]
$: buttonClickActions =
titleButtonClickBehaviour === "actions" || dataSource?.type !== "table"
titleButtonClickBehaviour === "actions" || !isDSPlus
? onClickTitleButton
: [
{