Allow using ephemeral action context for 'buttons' type settings
This commit is contained in:
parent
57e3b1ad08
commit
9f285b32a7
|
@ -4,10 +4,13 @@
|
|||
import { createEventDispatcher } from "svelte"
|
||||
import { store } from "builderStore"
|
||||
import { Helpers } from "@budibase/bbui"
|
||||
import { getEventContextBindings } from "builderStore/dataBinding"
|
||||
|
||||
export let componentInstance
|
||||
export let componentBindings
|
||||
export let bindings
|
||||
export let value
|
||||
export let key
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
|
@ -15,9 +18,14 @@
|
|||
|
||||
$: buttonList = sanitizeValue(value) || []
|
||||
$: buttonCount = buttonList.length
|
||||
$: eventContextBindings = getEventContextBindings({
|
||||
componentInstance,
|
||||
settingKey: key,
|
||||
})
|
||||
$: allBindings = [...bindings, ...eventContextBindings]
|
||||
$: itemProps = {
|
||||
componentBindings: componentBindings || [],
|
||||
bindings,
|
||||
bindings: allBindings,
|
||||
removeButton,
|
||||
canRemove: true,
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
export let value
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let sanitisedFields
|
||||
let fieldList
|
||||
let schema
|
||||
|
|
|
@ -6346,7 +6346,14 @@
|
|||
"settings": [
|
||||
{
|
||||
"type": "buttonConfiguration",
|
||||
"key": "buttons"
|
||||
"key": "buttons",
|
||||
"nested": true,
|
||||
"context": [
|
||||
{
|
||||
"label": "Clicked row",
|
||||
"key": "row"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue