Fix table blocks not being able to create rows through V2 views
This commit is contained in:
parent
8269ecf237
commit
f7805ef5f9
|
@ -45,6 +45,7 @@
|
||||||
let enrichedSearchColumns
|
let enrichedSearchColumns
|
||||||
let schemaLoaded = false
|
let schemaLoaded = false
|
||||||
|
|
||||||
|
$: isDSPlus = dataSource?.type === "table" || dataSource?.type === "viewV2"
|
||||||
$: fetchSchema(dataSource)
|
$: fetchSchema(dataSource)
|
||||||
$: enrichSearchColumns(searchColumns, schema).then(
|
$: enrichSearchColumns(searchColumns, schema).then(
|
||||||
val => (enrichedSearchColumns = val)
|
val => (enrichedSearchColumns = val)
|
||||||
|
@ -53,8 +54,7 @@
|
||||||
$: editTitle = getEditTitle(detailsFormBlockId, primaryDisplay)
|
$: editTitle = getEditTitle(detailsFormBlockId, primaryDisplay)
|
||||||
$: normalFields = getNormalFields(schema)
|
$: normalFields = getNormalFields(schema)
|
||||||
$: rowClickActions =
|
$: rowClickActions =
|
||||||
clickBehaviour === "actions" ||
|
clickBehaviour === "actions" || !isDSPlus
|
||||||
(dataSource?.type !== "table" && dataSource?.type !== "viewV2")
|
|
||||||
? onClick
|
? onClick
|
||||||
: [
|
: [
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
$: buttonClickActions =
|
$: buttonClickActions =
|
||||||
titleButtonClickBehaviour === "actions" || dataSource?.type !== "table"
|
titleButtonClickBehaviour === "actions" || !isDSPlus
|
||||||
? onClickTitleButton
|
? onClickTitleButton
|
||||||
: [
|
: [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue