1
0
Fork 0
mirror of synced 2024-06-25 17:40:38 +12:00

clear form action - adjust manifest and add settings form

This commit is contained in:
Maurits Lourens 2021-07-26 15:05:22 +02:00
parent 35d5a2d082
commit 82cc14ed53
3 changed files with 39 additions and 1 deletions

View file

@ -0,0 +1,35 @@
<script>
import { Select, Label } from "@budibase/bbui"
import { currentAsset, store } from "builderStore"
import { getActionProviderComponents } from "builderStore/dataBinding"
export let parameters
$: actionProviders = getActionProviderComponents(
$currentAsset,
$store.selectedComponentId,
"ClearForm"
)
</script>
<div class="root">
<Label small>Form</Label>
<Select
bind:value={parameters.componentId}
options={actionProviders}
getOptionLabel={x => x._instanceName}
getOptionValue={x => x._id}
/>
</div>
<style>
.root {
display: grid;
column-gap: var(--spacing-l);
row-gap: var(--spacing-s);
grid-template-columns: 60px 1fr;
align-items: center;
max-width: 800px;
margin: 0 auto;
}
</style>

View file

@ -5,6 +5,7 @@ import ExecuteQuery from "./ExecuteQuery.svelte"
import TriggerAutomation from "./TriggerAutomation.svelte"
import ValidateForm from "./ValidateForm.svelte"
import LogOut from "./LogOut.svelte"
import ClearForm from "./ClearForm.svelte"
// Defines which actions are available to configure in the front end.
// Unfortunately the "name" property is used as the identifier so please don't
@ -44,5 +45,6 @@ export default [
},
{
name: "Clear Form",
component: ClearForm
},
]

View file

@ -1647,7 +1647,8 @@
"hasChildren": true,
"illegalChildren": ["section"],
"actions": [
"ValidateForm"
"ValidateForm",
"ClearForm"
],
"styles": ["size"],
"settings": [