Fix for #6702 - remove users table as an option for automation triggers.
This commit is contained in:
parent
6ee5a78b0c
commit
cda958e0b7
|
@ -41,6 +41,7 @@
|
|||
let fillWidth = true
|
||||
let codeBindingOpen = false
|
||||
|
||||
$: console.log(block)
|
||||
$: stepId = block.stepId
|
||||
$: bindings = getAvailableBindings(
|
||||
block || $automationStore.selectedBlock,
|
||||
|
@ -54,6 +55,7 @@
|
|||
$: schema = getSchemaForTable(tableId, { searchableSchema: true }).schema
|
||||
$: schemaFields = Object.values(schema || {})
|
||||
$: queryLimit = tableId?.includes("datasource") ? "∞" : "1000"
|
||||
$: isTrigger = block?.type === "TRIGGER"
|
||||
|
||||
const onChange = Utils.sequential(async (e, key) => {
|
||||
try {
|
||||
|
@ -261,6 +263,7 @@
|
|||
/>
|
||||
{:else if value.customType === "table"}
|
||||
<TableSelector
|
||||
{isTrigger}
|
||||
value={inputData[key]}
|
||||
on:change={e => onChange(e, key)}
|
||||
/>
|
||||
|
|
|
@ -2,10 +2,16 @@
|
|||
import { tables } from "stores/backend"
|
||||
import { Select } from "@budibase/bbui"
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import { TableNames } from "constants"
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
export let value
|
||||
export let isTrigger
|
||||
|
||||
$: filteredTables = $tables.list.filter(table => {
|
||||
return !isTrigger || table._id !== TableNames.USERS
|
||||
})
|
||||
|
||||
const onChange = e => {
|
||||
value = e.detail
|
||||
|
@ -16,7 +22,7 @@
|
|||
<Select
|
||||
on:change={onChange}
|
||||
bind:value
|
||||
options={$tables.list}
|
||||
options={filteredTables}
|
||||
getOptionLabel={table => table.name}
|
||||
getOptionValue={table => table._id}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue